diff options
Diffstat (limited to 'source/blender/freestyle/intern/geometry/GeomUtils.h')
-rw-r--r-- | source/blender/freestyle/intern/geometry/GeomUtils.h | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/source/blender/freestyle/intern/geometry/GeomUtils.h b/source/blender/freestyle/intern/geometry/GeomUtils.h index dbb7a5d4e75..64aa6379e80 100644 --- a/source/blender/freestyle/intern/geometry/GeomUtils.h +++ b/source/blender/freestyle/intern/geometry/GeomUtils.h @@ -83,17 +83,14 @@ typedef enum { 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) @@ -101,26 +98,21 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r& p1, const Vec2r& p2 real epsilon = M_EPSILON); /*! 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(const Vec3r& orig, const Vec3r& dir, const Vec3r& v0, const Vec3r& v1, const Vec3r& v2, real& t, // I = orig + t * dir real& u, real& v, // I = (1 - u - v) * v0 + u * v1 + v * v2 const 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(const Vec3r& orig, const Vec3r& dir, // ray origin and direction // plane's normal and offset (plane = { P / P.N + d = 0 }) const Vec3r& norm, const real d, @@ -130,7 +122,6 @@ intersection_test intersectRayPlane(const Vec3r& orig, const Vec3r& dir, // ray /*! 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. */ -LIB_GEOMETRY_EXPORT bool intersectRayBBox(const Vec3r& orig, const Vec3r& dir, // ray origin and direction const Vec3r& boxMin, const Vec3r& boxMax, // the bbox // the interval in which at least on of the intersections must happen @@ -140,16 +131,12 @@ bool intersectRayBBox(const Vec3r& orig, const Vec3r& dir, // ray origin an 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(const Vec3r& P, const Vec3r& A, const Vec3r& B, const Vec3r& C); -LIB_GEOMETRY_EXPORT void transformVertex(const Vec3r& vert, const Matrix44r& matrix, Vec3r& res); -LIB_GEOMETRY_EXPORT void transformVertices(const vector<Vec3r>& vertices, const Matrix44r& trans, vector<Vec3r>& res); -LIB_GEOMETRY_EXPORT Vec3r rotateVector(const Matrix44r& mat, const Vec3r& v); // @@ -171,7 +158,6 @@ Vec3r rotateVector(const Matrix44r& mat, const Vec3r& v); * 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]); @@ -186,7 +172,6 @@ void fromWorldToImage(const Vec3r& p, Vec3r& q, const real model_view_matrix[4][ * 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 @@ -200,7 +185,6 @@ void fromWorldToImage(const Vec3r& p, Vec3r& q, const real transform[4][4], cons * 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 @@ -213,7 +197,6 @@ void fromWorldToCamera(const Vec3r& p, Vec3r& q, const real model_view_matrix[4] * 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. @@ -225,7 +208,6 @@ void fromCameraToRetina(const Vec3r& p, Vec3r& q, const real projection_matrix[4 * 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 @@ -236,7 +218,6 @@ void fromRetinaToImage(const Vec3r& p, Vec3r& q, const int viewport[4]); * 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, @@ -251,7 +232,6 @@ void fromImageToRetina(const Vec3r& p, Vec3r& q, const int viewport[4]); * 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 @@ -265,7 +245,6 @@ void fromRetinaToCamera(const Vec3r& p, Vec3r& q, real z, const real projection_ * 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 |