/* This file is automatically generated. DO NOT EDIT! */ #ifndef _HWT_3D_mm_h #define _HWT_3D_mm_h #include "HWT_3D_mm.h" typedef struct{ double x,y,z; /* location */ float v,mx,my,mz; /* value */ }pt3d_cur; typedef struct{ double v; /* velocity */ double mx; /* current */ double my; /* current */ double mz; /* current */ }vm; typedef struct{ double x,y,z; /* location */ }point3d; typedef struct{ point3d P0,P1; /* location */ }ray3d; typedef struct{ point3d V0,V1,V2; /* location */ }triangle3d; bool lg_surf; point3d So; #define MISSING -1 #define SMALL_NUM 0.00000001 // anything that avoids division overflow /*------------------------------------------------------------*/ void hwt3d_init(float*** vv_in /* velocity */, float*** curx_in /* current */, float*** cury_in, float*** curz_in, sf_axis az_in /* z axis */, sf_axis ax_in /* x axis */, sf_axis ay_in /* y axis */, sf_axis at_in /* t axis */, sf_axis ag_in /* g axis */, sf_axis ah_in /* h axis */, float Asurf_in,float Bsurf_in, float Csurf_in,float dsurf_in); /*< initialize hwt3d >*/ /*------------------------------------------------------------*/ vm hwt3d_getv(pt3d_cur P); /*< get velocity from 3-D cube by linear interpolation >*/ /*------------------------------------------------------------*/ pt3d_cur get_point(vm v,pt3d_cur G); /*< find velocity >*/ pt3d_cur hwt3d_raytr(//float ***vv, pt3d_cur Tm, pt3d_cur To, float scaleray,FILE *stream,bool refl); /*< ray tracing >*/ pt3d_cur hwt3d_step(//float ***vv, pt3d_cur Tm, pt3d_cur To, pt3d_cur Gm, pt3d_cur Gp, pt3d_cur Hm, pt3d_cur Hp, bool refl); /*< one HWT time step >*/ /*----------------------------------------------------------------*/ void wavefront(FILE *stream, int ah, int ag, pt3d_cur **wp, float oh,float og,float dh,float dg,float tt); /*< wavefront text file >*/ /*----------------------------------------------------------------*/ point3d zinterp( pt3d_cur p1, point3d p0 ); /*< interpolatio for reflected points to find x,y if z=0 >*/ /*----------------------------------------------------------------*/ point3d yinterp( pt3d_cur p1, pt3d_cur p0, float Dpy ); /*< interpolatio for reflected points to find x,y if z=0 >*/ /*--------------------------------------------------------------*/ pt3d_cur* pt3d_curalloc1( size_t n1); /*< alloc point3d 1-D vector >*/ /*--------------------------------------------------------------*/ pt3d_cur** pt3d_curalloc2( size_t n1, size_t n2); /*< alloc point3d 2-D vector >*/ /*------------------------------------------------------------*/ vc3d vec3d_cur(pt3d_cur* O, pt3d_cur* A); /*< build 3D vector >*/ /*------------------------------------------------------------*/ vc3d vec3d_uc(pt3d_cur* A); /*< build 3D vector u/c >*/ /*-----------------------------------------------------------*/ pt3d_cur tip3d_cur(pt3d_cur* O, vc3d* V); /*< tip of a 3D vector >*/ // 3D Time front /*------------------------------------------------------------*/ point3d get_point3d(pt3d_cur G); /*< transform triangle coordinates from pt3d_cur to point3d structure >*/ /*------------------------------------------------------------*/ point3d crossp3d(point3d* U, point3d* V); /*< vector product of 3D vectors - cross product >*/ /*------------------------------------------------------------*/ point3d mult3d(point3d* U, float a); /*< vector product of 3D vectors - cross product >*/ /*------------------------------------------------------------*/ point3d zeropoint(double x); /*< fill 3d point >*/ /*------------------------------------------------------------*/ point3d dif3d(point3d* A, point3d* B); /*< build 3D vector >*/ /*------------------------------------------------------------*/ point3d sum3d(point3d* A, point3d* B); /*< build 3D vector >*/ /*------------------------------------------------------------*/ float dot3d(point3d* U, point3d* V); /*< dot product (3D) which allows vector operations in arguments >*/ int intersect_RayTriangle( ray3d R, triangle3d T, point3d* Intsec); /*< intersect a straight line with a 3D triangle >*/ #endif