19#define a_plane_c(x) a_cast_s(a_plane, x)
20#define a_plane_(_, x) a_cast_s(a_plane _, x)
24#if defined(__cplusplus)
31#if !defined A_HAVE_INLINE || defined(LIBA_PLANE_C)
34#define A_INTERN A_PUBLIC extern
64#if !defined A_HAVE_INLINE || defined(LIBA_PLANE_C)
67#define A_INTERN static A_INLINE
70#if defined(__cplusplus)
81#if defined(__cplusplus)
84 a_plane_set_org(
this, x, y, z);
86 A_INLINE
a_vector3 const &dir()
const {
return dir_; }
89 return a_plane_set_dir(
this, x, y, z);
93 return a_plane_set_uv(
this, &u, &v);
97 return a_plane_set_u(
this, &n, &u);
101 return a_plane_set_v(
this, &n, &v);
103 A_INLINE
a_vector3 const &u()
const {
return u_; }
104 A_INLINE
a_vector3 const &v()
const {
return v_; }
107 return a_plane_set(
this, &p, &n);
111 return a_plane_set3(
this, &p1, &p2, &p3);
115 a_plane_eval(
this, u, v, &res);
119 a_plane_parm(
this, &p, &u, &v);
123 return a_plane_proj(
this, &p, &res);
127 return a_plane_sdist(
this, &rhs);
131 return a_plane_dist(
this, &rhs);
135 return a_plane_int0(
this, &rhs, &u, &v);
139 return a_plane_int1(
this, &rhs, min, max, &w);
143 return a_plane_int2(
this, &rhs, &res);
145 A_INLINE
void rot2d(
a_real angle)
147 a_plane_rot2d(
this, angle);
152#if defined(LIBA_PLANE_C)
155#define A_INTERN A_INLINE
158#if defined(A_HAVE_INLINE) || defined(LIBA_PLANE_C)
185 a_point3 const *
const o = &ctx->org;
188 res->x = o->x + a->x * u + b->x * v;
189 res->y = o->y + a->y * u + b->y * v;
190 res->z = o->z + a->z * u + b->z * v;
194#if defined(LIBA_PLANE_C)
197#define A_INTERN static A_INLINE
double a_real
compiler built-in floating-point number type
Definition a.h:1012
instance structure for three-dimensional line defined by an origin, a direction vector,...
Definition line3.h:297
instance structure for three-dimensional plane
Definition plane.h:78
instance structure for three-dimensional point
Definition point3.h:350
instance structure for three-dimensional vector
Definition vector3.h:415