Shadows
This commit is contained in:
@@ -69,6 +69,16 @@ point_inside_aabb :: (aabb: AABB, point: Vector3) -> bool {
|
||||
&& point.z >= aabb.min.z && point.z <= aabb.max.z;
|
||||
}
|
||||
|
||||
aabb_add :: (aabb: *AABB, point: Vector3) {
|
||||
aabb.min.x = min(point.x, aabb.min.x);
|
||||
aabb.min.y = min(point.y, aabb.min.y);
|
||||
aabb.min.z = min(point.z, aabb.min.z);
|
||||
|
||||
aabb.max.x = max(point.x, aabb.max.x);
|
||||
aabb.max.y = max(point.y, aabb.max.y);
|
||||
aabb.max.z = max(point.z, aabb.max.z);
|
||||
}
|
||||
|
||||
operator == :: inline (a: Vector3i, b: Vector3i) -> bool {
|
||||
return a.x == b.x && a.y == b.y && a.z == b.z;
|
||||
}
|
||||
@@ -366,4 +376,5 @@ ease_in_out_sine :: (x: float) -> float {
|
||||
}
|
||||
|
||||
#import "PCG";
|
||||
#import "Math";
|
||||
#import "Math";
|
||||
#load "frustum.jai";
|
||||
Reference in New Issue
Block a user