Documentation ¶
Index ¶
- type Rectangle
- func (r *Rectangle) BoundingBox(t0, t1 float64) (*aabb.AABB, bool)
- func (r *Rectangle) Copy() primitive.Primitive
- func (r *Rectangle) Intersection(ray geometry.Ray, tMin, tMax float64, rng *rand.Rand) (*material.RayHit, bool)
- func (r *Rectangle) IsClosed() bool
- func (r *Rectangle) IsInfinite() bool
- func (r *Rectangle) SetMaterial(m material.Material)
- func (r *Rectangle) Setup() (*Rectangle, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rectangle ¶
type Rectangle struct { A geometry.Point `json:"a"` B geometry.Point `json:"b"` IsCulled bool `json:"is_culled"` HasNegativeNormal bool `json:"has_negative_normal"` // contains filtered or unexported fields }
Rectangle represents a Axis-Aligned rectangle geometry object
func (*Rectangle) BoundingBox ¶
BoundingBox return an AABB of this object
func (*Rectangle) Intersection ¶
func (r *Rectangle) Intersection(ray geometry.Ray, tMin, tMax float64, rng *rand.Rand) (*material.RayHit, bool)
Intersection computer the intersection of this object and a given ray if it exists
func (*Rectangle) IsInfinite ¶
IsInfinite return whether this object is infinite
func (*Rectangle) SetMaterial ¶
SetMaterial sets this object's material
Click to show internal directories.
Click to hide internal directories.