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:
parent
8e3c426684
commit
8e306168da
8 changed files with 197 additions and 37 deletions
|
@ -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_
|
||||
)
|
||||
)
|
||||
|
|
|
@ -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
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue