11#pragma once
22
3- #ifdef MR_PARSING_FOR_PB11_BINDINGS
3+ #ifdef MR_PARSING_FOR_ANY_BINDINGS
44
55#include " MRMesh/MRDistanceMap.h"
66#include " MRMesh/MRMesh.h"
@@ -20,31 +20,41 @@ namespace MR
2020
2121#define VEC3 (T, isFloatingPoint ) \
2222 template struct Vector3 <T>; \
23+ template T distanceSq ( const Vector3<T> & a, const Vector3<T> & b ); \
24+ INST_IF (isFloatingPoint)( \
25+ template T distance ( const Vector3<T> & a, const Vector3<T> & b ); \
26+ ) \
2327 template Vector3<T> cross ( const Vector3<T> & a, const Vector3<T> & b ); \
2428 template T dot ( const Vector3<T> & a, const Vector3<T> & b ); \
2529 template T sqr ( const Vector3<T> & a ); \
2630 template T mixed ( const Vector3<T> & a, const Vector3<T> & b, const Vector3<T> & c ); \
2731 template Vector3<T> mult ( const Vector3<T>& a, const Vector3<T>& b ); \
32+ template Vector3<T> div ( const Vector3<T>& a, const Vector3<T>& b ); \
2833 template T angle ( const Vector3<T> & a, const Vector3<T> & b ); \
2934 INST_IF (isFloatingPoint)( \
3035 template Vector3<T> unitVector3 ( T azimuth, T altitude ); \
3136 )
3237
33- #define VEC2 (T ) \
38+ #define VEC2 (T, isFloatingPoint ) \
3439 template struct Vector2 <T>; \
40+ template T distanceSq ( const Vector2<T> & a, const Vector2<T> & b ); \
41+ INST_IF (isFloatingPoint)( \
42+ template T distance ( const Vector2<T> & a, const Vector2<T> & b ); \
43+ ) \
3544 template T cross ( const Vector2<T> & a, const Vector2<T> & b ); \
3645 template T dot ( const Vector2<T> & a, const Vector2<T> & b ); \
3746 template T sqr ( const Vector2<T> & a ); \
3847 template Vector2<T> mult ( const Vector2<T>& a, const Vector2<T>& b ); \
48+ template Vector2<T> div ( const Vector2<T>& a, const Vector2<T>& b ); \
3949 template T angle ( const Vector2<T> & a, const Vector2<T> & b );
4050
4151VEC3 (float , 1 )
4252VEC3 (double , 1 )
4353VEC3 (int , 0 )
4454
45- VEC2 (float )
46- VEC2 (double )
47- VEC2 (int )
55+ VEC2 (float , 1 )
56+ VEC2 (double , 1 )
57+ VEC2 (int , 0 )
4858
4959#undef VEC3
5060#undef VEC2
0 commit comments