|
shape_doc 0.1
|
#include <cmath>#include <fstream>#include <shape/ssiqtsl.hpp>#include <shape/ssiqts_tri_tri.hpp>#include <shape/ssiqts_offsets.hpp>Go to the source code of this file.
| #define __convert_order__ | ( | i, | |
| point | |||
| ) | { point[(i+1)%2] = 1.0-point[(i+1)%2]; } |
Definition at line 42 of file ssiqtsl.cpp.
| #define __down__ 1 |
Definition at line 33 of file ssiqtsl.cpp.
Referenced by mmx::solve_cf().
| #define __down__param_triangle__ | ( | q | ) | q[1],q[0],q[2] |
Definition at line 41 of file ssiqtsl.cpp.
| #define __down__triangle__ | ( | q | ) | q[0],q[1],q[2] |
Definition at line 37 of file ssiqtsl.cpp.
| #define __triangle_triangle_case__ | ( | trig0, | |
| trig1 | |||
| ) |
{ \
intersection = \
intersectp_triangles3_isegment \
( coplanar, seg[0], seg[1], \
trig0##triangle__(qa), \
trig1##triangle__(qb), double(1e-9) ); \
if ( intersection ) \
{ \
if ( !coplanar ) \
{ \
space2prm(/* points in parameter space */ \
seg0[0], seg0[1], \
/* corresponding points in R3 */ \
seg[0], seg[1], \
/* parametric plane = base + 2 vectors */ \
trig0##param_triangle__(qa) \
); \
space2prm( seg1[0], seg1[1], \
seg[0], seg[1], \
trig1##param_triangle__(qb) ); \
/* retrieve the correct offset coordinates in quad */ \
__convert_order__(trig0,seg0[0]); \
__convert_order__(trig0,seg0[1]); \
__convert_order__(trig1,seg1[0]); \
__convert_order__(trig1,seg1[1]); \
\
double * left_uvals = ssi.smpa->m_uvals; \
double * left_vvals = ssi.smpa->m_vvals; \
double * righ_uvals = ssi.smpb->m_uvals; \
double * righ_vvals = ssi.smpb->m_vvals; \
for ( int i = 0; i < 2; i ++ ) \
{ \
seg0[i][0] = left_uvals[a/ssi.m] + seg0[i][0] * (left_uvals[a/ssi.m+1]-left_uvals[a/ssi.m]);\
seg0[i][1] = left_vvals[a%ssi.m] + seg0[i][1] * (left_vvals[a%ssi.m+1]-left_vvals[a%ssi.m]);\
}; \
for ( int i = 0; i < 2; i ++ ) \
{ \
seg1[i][0] = righ_uvals[b/ssi.m] + seg1[i][0] * (righ_uvals[b/ssi.m+1]-righ_uvals[b/ssi.m]);\
seg1[i][1] = righ_vvals[b%ssi.m] + seg1[i][1] * (righ_vvals[b%ssi.m+1]-righ_vvals[b%ssi.m]);\
}; \
ssi.lpts.push_back(seg0[0]); \
ssi.lpts.push_back(seg0[1]); \
ssi.rpts.push_back(seg1[0]); \
ssi.rpts.push_back(seg1[1]); \
} \
} \
}
Definition at line 45 of file ssiqtsl.cpp.
Referenced by mmx::solve_cf().
| #define __up__ 0 |
Definition at line 32 of file ssiqtsl.cpp.
Referenced by mmx::solve_cf().
| #define __up__param_triangle__ | ( | q | ) | q[3],q[2],q[0] |
Definition at line 39 of file ssiqtsl.cpp.
| #define __up__triangle__ | ( | q | ) | q[0],q[3],q[2] |
Definition at line 35 of file ssiqtsl.cpp.
| #define _ij_ | ( | i, | |
| j | |||
| ) | (i)*n+j |
| #define ParametricSurface shape::surface_parametric<double> |
Definition at line 5 of file ssiqtsl.cpp.