1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

[sprout.darkroom] implemented refraction

This commit is contained in:
bolero-MURAKAMI 2013-12-06 01:57:31 +09:00
parent 8e3c426684
commit 8e306168da
8 changed files with 197 additions and 37 deletions

View file

@ -79,14 +79,8 @@ namespace sprout {
inter,
sprout::darkroom::objects::intersect(
objs,
sprout::darkroom::rays::make_ray(
sprout::darkroom::coords::add(
sprout::darkroom::coords::scale(
dir_,
sprout::numeric_limits<unit_type>::epsilon() * 256
),
sprout::darkroom::intersects::point_of_intersection(inter)
),
sprout::darkroom::rays::make_detached_ray(
sprout::darkroom::intersects::point_of_intersection(inter),
dir_
)
)

View file

@ -83,14 +83,8 @@ namespace sprout {
direction,
sprout::darkroom::objects::intersect(
objs,
sprout::darkroom::rays::make_ray(
sprout::darkroom::coords::add(
sprout::darkroom::coords::scale(
direction,
sprout::numeric_limits<unit_type>::epsilon() * 256
),
sprout::darkroom::intersects::point_of_intersection(inter)
),
sprout::darkroom::rays::make_detached_ray(
sprout::darkroom::intersects::point_of_intersection(inter),
direction
)
)