|
1 | 1 | (require :unittest "lib/llib/unittest.l")
|
2 | 2 |
|
| 3 | +#-(or :x86_64 :aarch64) |
| 4 | +(setq *temp-eps* 1e-5) |
| 5 | + |
| 6 | +#+(or :x86_64 :aarch64) |
| 7 | +(setq *temp-eps* 1e-8) |
| 8 | + |
3 | 9 | (init-unit-test)
|
4 | 10 |
|
5 | 11 | (defun points-size-check (make-element-func &key (size 10))
|
|
150 | 156 | )
|
151 | 157 | (send *base* :assoc *point*)
|
152 | 158 | (let ((p (send *point* :convert-to-world :create t)))
|
153 |
| - (assert (eps-v= (car (send *point* :point-list)) *origin-p* 1e-8)) ;; original does not move |
154 |
| - (assert (eps-v= (car (send p :point-list)) *origin-p* 1e-8)) |
| 159 | + (assert (eps-v= (car (send *point* :point-list)) *origin-p* *temp-eps*)) ;; original does not move |
| 160 | + (assert (eps-v= (car (send p :point-list)) *origin-p* *temp-eps*)) |
155 | 161 | )
|
156 | 162 |
|
157 | 163 | (send *base* :transform *bcoords*)
|
158 | 164 | (let ((p (send *point* :convert-to-world :create t)))
|
159 |
| - (assert (eps-v= (car (send *point* :point-list)) *origin-p* 1e-8)) ;; original does not move |
| 165 | + (assert (eps-v= (car (send *point* :point-list)) *origin-p* *temp-eps*)) ;; original does not move |
160 | 166 | (assert (eps-v=
|
161 | 167 | (car (send p :point-list))
|
162 | 168 | (send (send *point* :worldcoords) :transform-vector (car (send *point* :point-list)))
|
163 |
| - 1e-8)) |
| 169 | + *temp-eps*)) |
164 | 170 | )
|
165 | 171 | (let ((pt (send (send *point* :worldcoords) :transform-vector (car (send *point* :point-list)))))
|
166 | 172 | (send *point* :convert-to-world :create nil)
|
167 | 173 | (assert (eps-v=
|
168 | 174 | (car (send *point* :point-list))
|
169 | 175 | (send (send *point* :worldcoords) :transform-vector (car (send *point* :point-list)))
|
170 |
| - 1e-8)) |
| 176 | + *temp-eps*)) |
171 | 177 | (assert (eps-v=
|
172 | 178 | (car (send *point* :point-list)) ;; original moved
|
173 | 179 | pt
|
174 |
| - 1e-8)) |
175 |
| - (assert (eps-v= (send *point* :worldpos) (float-vector 0 0 0) 1e-8)) |
| 180 | + *temp-eps*)) |
| 181 | + (assert (eps-v= (send *point* :worldpos) (float-vector 0 0 0) *temp-eps*)) |
176 | 182 | (assert (eps-v= (array-entity (send *point* :worldrot))
|
177 |
| - (float-vector 1 0 0 0 1 0 0 0 1) 1e-8)) |
| 183 | + (float-vector 1 0 0 0 1 0 0 0 1) *temp-eps*)) |
178 | 184 | )
|
179 | 185 | ))
|
180 | 186 |
|
|
191 | 197 | (eps-v=
|
192 | 198 | (send (send *point* :worldcoords) :transform-vector (car (send *point* :point-list)))
|
193 | 199 | *origin-p*
|
194 |
| - 1e-8)) |
| 200 | + *temp-eps*)) |
195 | 201 | (assert
|
196 | 202 | (eps-v=
|
197 | 203 | (send *bcoords* :transform-vector (car (send *point* :point-list)))
|
198 | 204 | (send (send *point* :worldcoords) :transform-vector (car (send *point* :point-list)))
|
199 |
| - 1e-8)) |
| 205 | + *temp-eps*)) |
200 | 206 |
|
201 | 207 | (send *point* :move-origin-to *ccoords*)
|
202 | 208 | (assert
|
203 | 209 | (eps-v=
|
204 | 210 | (send (send *point* :worldcoords) :transform-vector (car (send *point* :point-list)))
|
205 | 211 | *origin-p*
|
206 |
| - 1e-8)) |
| 212 | + *temp-eps*)) |
207 | 213 | (assert
|
208 | 214 | (eps-v=
|
209 | 215 | (send *ccoords* :transform-vector (car (send *point* :point-list)))
|
210 | 216 | (send (send *point* :worldcoords) :transform-vector (car (send *point* :point-list)))
|
211 |
| - 1e-8)) |
| 217 | + *temp-eps*)) |
212 | 218 |
|
213 | 219 | (send *point* :move-origin-to (make-coords))
|
214 | 220 | (assert
|
215 | 221 | (eps-v=
|
216 | 222 | (send (send *point* :worldcoords) :transform-vector (car (send *point* :point-list)))
|
217 | 223 | *origin-p*
|
218 |
| - 1e-8)) |
| 224 | + *temp-eps*)) |
219 | 225 |
|
220 | 226 | (setq *point*
|
221 | 227 | (instance pointcloud :init :points (list *origin-p*) :point-size 10))
|
|
227 | 233 | (eps-v=
|
228 | 234 | (send (send *point* :worldcoords) :transform-vector (car (send *point* :point-list)))
|
229 | 235 | (float-vector 792.732209445 539.4908242525 2397.9448709116)
|
230 |
| - 1e-8)) |
| 236 | + *temp-eps*)) |
231 | 237 |
|
232 | 238 | (send *point* :move-origin-to *ccoords*)
|
233 | 239 | (assert
|
234 | 240 | (eps-v=
|
235 | 241 | (send (send *point* :worldcoords) :transform-vector (car (send *point* :point-list)))
|
236 | 242 | (float-vector 792.732209445 539.4908242525 2397.9448709116)
|
237 |
| - 1e-8)) |
| 243 | + *temp-eps*)) |
238 | 244 | (assert
|
239 |
| - (eps-v= (send *point* :worldpos) (send *ccoords* :pos) 1e-8)) |
| 245 | + (eps-v= (send *point* :worldpos) (send *ccoords* :pos) *temp-eps*)) |
240 | 246 | (assert
|
241 | 247 | (eps-v=
|
242 | 248 | (array-entity (send *point* :worldrot))
|
243 |
| - (array-entity (send *ccoords* :rot)) 1e-8)) |
| 249 | + (array-entity (send *ccoords* :rot)) *temp-eps*)) |
244 | 250 | )
|
245 | 251 | )
|
246 | 252 | ))
|
|
0 commit comments