#include <surface.h>
|
| splane (void) |
| Constructors.
|
|
| splane (const splane &fsp) |
|
| splane (const plane &fpn, const vec &fdir_ins) |
|
| macro_copy_total (splane) |
|
virtual | ~splane () |
| Destructor.
|
|
int | check_point_inside (const point &fpt, const vec &dir, vfloat fprec) const |
|
int | check_point_inside1 (const point &fpt, int s_ext, vfloat fprec) const |
|
int | range (const trajestep &fts, vfloat *crange, point *cpt, int *s_ext) const |
|
int | cross (const polyline &fpl, point *cntrpt, int &qcntrpt, vfloat prec) const |
|
virtual void | print (std::ostream &file, int l) const |
|
| macro_copy_total_zero (surface) |
|
virtual | ~surface () |
|
virtual int | check_point_inside (const point &fpt, const vec &dir, vfloat fprec) const =0 |
|
virtual int | check_point_inside1 (const point &fpt, int s_ext, vfloat fprec) const =0 |
|
virtual int | range (const trajestep &fts, vfloat *crange, point *cpt, int *s_ext) const =0 |
|
virtual int | cross (const polyline &fpl, point *cntrpt, int &qcntrpt, vfloat prec) const =0 |
|
virtual void | print (std::ostream &file, int l) const =0 |
|
Definition at line 72 of file surface.h.
◆ splane() [1/3]
Heed::splane::splane |
( |
void |
| ) |
|
|
inline |
◆ splane() [2/3]
Heed::splane::splane |
( |
const splane & |
fsp | ) |
|
|
inline |
◆ splane() [3/3]
Heed::splane::splane |
( |
const plane & |
fpn, |
|
|
const vec & |
fdir_ins |
|
) |
| |
|
inline |
◆ ~splane()
virtual Heed::splane::~splane |
( |
| ) |
|
|
inlinevirtual |
◆ check_point_inside()
int Heed::splane::check_point_inside |
( |
const point & |
fpt, |
|
|
const vec & |
dir, |
|
|
vfloat |
fprec |
|
) |
| const |
|
virtual |
Implements Heed::surface.
Definition at line 26 of file surface.cpp.
27 {
28 mfunname(
"int splane::check_point_inside(const point& fpt, const vec& dir, "
29 "vfloat fprec)");
31
32 if (fpt ==
pn.
Gpiv())
return 1;
35 return 0;
36 }
39 if (ca < 0) return 0;
40 return 1;
41 }
44 return 0;
45
46}
int check_point_in(const point &fp, vfloat prec) const
vfloat cos2vec(const vec &r1, const vec &r2)
◆ check_point_inside1()
int Heed::splane::check_point_inside1 |
( |
const point & |
fpt, |
|
|
int |
s_ext, |
|
|
vfloat |
fprec |
|
) |
| const |
|
virtual |
Implements Heed::surface.
Definition at line 48 of file surface.cpp.
49 {
51 if (s_ext == 1) return 0;
52 return 1;
53 }
56 return 0;
57
58}
◆ cross()
int Heed::splane::cross |
( |
const polyline & |
fpl, |
|
|
point * |
cntrpt, |
|
|
int & |
qcntrpt, |
|
|
vfloat |
prec |
|
) |
| const |
|
inlinevirtual |
Implements Heed::surface.
Definition at line 114 of file surface.h.
115 {
116 polyline* plh = new polyline[fpl.Gqsl()];
117 int qplh;
118 int i =
pn.
cross(fpl, cntrpt, qcntrpt, plh, qplh, prec);
119 delete plh;
120 return i;
121 }
point cross(const straight &sl) const
◆ get_components()
void Heed::splane::get_components |
( |
ActivePtr< absref_transmit > & |
aref_tran | ) |
|
|
protectedvirtual |
Definition at line 22 of file surface.cpp.
22 {
23 aref_tran.pass(
new absref_transmit(2,
aref_splane));
24}
static absrefabsref::*[2] aref_splane
◆ macro_copy_total()
Heed::splane::macro_copy_total |
( |
splane |
| ) |
|
◆ print()
void Heed::splane::print |
( |
std::ostream & |
file, |
|
|
int |
l |
|
) |
| const |
|
virtual |
Implements Heed::surface.
Definition at line 180 of file surface.cpp.
180 {
181 if (l > 0) {
182 Ifile <<
"splane:\n";
187 }
188}
std::ostream & noindent(std::ostream &f)
◆ range()
Implements Heed::surface.
Definition at line 60 of file surface.cpp.
61 {
64
68 return 0;
69 }
72
73
75
76 cpt[0] = pt;
77 crange[0] = rng;
79 if (t < 0)
80 s_ext[0] = 1;
81 else if (t > 0)
82 s_ext[0] = 0;
83 else
84 s_ext[0] = 2;
85 return 1;
86 }
87 return 0;
88 } else
89 return 0;
90 } else {
95 int q = cf.cross(
pn, pt, 0.0);
96 if (q == -1)
97 {
99 crange[0] = 0.0;
100 s_ext[0] = 2;
101 return 1;
102 }
103 if (q == 0) return 0;
104 if (q == 1) {
106 vec r2 = pt[0] - cf.Gpiv();
108 vfloat rng = cf.Grad() * angle;
110 cpt[0] = pt[0];
111 crange[0] = rng;
113 if (angle == 0.0) {
114
115 if (c > 0)
116 s_ext[0] = 0;
117 else if (c < 0)
118 s_ext[0] = 1;
119 else
120 s_ext[0] = 2;
121 } else {
122 if (c > 0)
123 s_ext[0] = 1;
124 else if (c < 0)
125 s_ext[0] = 0;
126 else
127 s_ext[0] = 2;
128 }
129 return 1;
130 } else
131 return 0;
132 }
133 if (q == 2) {
134 int qq = 0;
137 vcr[0] = pt[0] - cf.Gpiv();
138 vcr[1] = pt[1] - cf.Gpiv();
142 if (angle[0] > angle[1]) {
144 angle[0] = angle[1];
145 angle[1] = a;
147 pt[0] = pt[1];
148 pt[1] = p;
149 }
151 rng = cf.Grad() * angle[0];
153
154 int ins = 0;
156 td.
turn(cf.Gdir(), angle[0]);
158 if (t < 0)
159 ins = 1;
160 else
161 ins = 0;
162 cpt[0] = pt[0];
163 crange[0] = rng;
164 s_ext[0] = ins;
165 qq++;
166 rng = cf.Grad() * angle[1];
168 cpt[1] = pt[1];
169 crange[1] = rng;
170 s_ext[1] = (ins == 0 ? 1 : 0);
171 qq++;
172 }
173 }
174 return qq;
175 }
176 }
177 return 0;
178}
void turn(const vec &dir, vfloat angle)
vfloat ang2projvec(const vec &r1, const vec &r2, const vec &normal)
◆ aref_splane
absref absref::* Heed::splane::aref_splane |
|
staticprotected |
◆ dir_ins
vec Heed::splane::dir_ins |
◆ pn
The documentation for this class was generated from the following files: