Skip to content

aabb class should manage AABB rotation, not rotate_y #819

@hollasch

Description

@hollasch

Currently the rotate_y::rotate_y() constructor takes a hittable and a rotation angle, gets the unrotated hittable AABB, and then computes the new AABB post rotation. This is undesirable because it means that the rotate_y class has to get all of the guts of the AABB object, then perform AABB computation to get the components of the new AABB, and then generate a new AABB from these pieces.

Instead, this should all be in a aabb::rotate_y() method, which returns a new transformed AABB.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions