Various bug fixes + Material setters
This commit is contained in:
parent
e35cca1830
commit
f5c912c489
5 changed files with 53 additions and 22 deletions
|
|
@ -4,11 +4,11 @@ package main
|
|||
type Sphere struct {
|
||||
center Vector3
|
||||
radius float64
|
||||
material Material
|
||||
material *Material
|
||||
}
|
||||
|
||||
func (s Sphere) Distance(p Vector3) (float64, Material) {
|
||||
return p.Sub(s.center).Length() - s.radius, s.material
|
||||
return p.Sub(s.center).Length() - s.radius, *s.material
|
||||
}
|
||||
|
||||
// Box
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue