Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CppRaytracer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yoel
CppRaytracer
Commits
98ac3237
Commit
98ac3237
authored
4 years ago
by
Yoel
Browse files
Options
Downloads
Patches
Plain Diff
Added siye method for AABB
parent
37c23573
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
RayTracer/tools/AxisAlignedBoundingBox.cpp
+3
-0
3 additions, 0 deletions
RayTracer/tools/AxisAlignedBoundingBox.cpp
RayTracer/tools/AxisAlignedBoundingBox.h
+1
-0
1 addition, 0 deletions
RayTracer/tools/AxisAlignedBoundingBox.h
with
4 additions
and
0 deletions
RayTracer/tools/AxisAlignedBoundingBox.cpp
+
3
−
0
View file @
98ac3237
...
...
@@ -127,6 +127,9 @@ bool AxisAlignedBoundingBox::partiallyContains(
if
(
contains
(
v
))
return
true
;
return
false
;
}
float
AxisAlignedBoundingBox
::
size
()
const
{
return
(
maxBound
()
-
minBound
()).
length
();
}
Vec3
AxisAlignedBoundingBox
::
center
()
const
{
return
(
max
+
min
)
/
2
;
}
...
...
This diff is collapsed.
Click to expand it.
RayTracer/tools/AxisAlignedBoundingBox.h
+
1
−
0
View file @
98ac3237
...
...
@@ -20,6 +20,7 @@ class AxisAlignedBoundingBox {
bool
contains
(
const
Vec3
&
v
)
const
;
bool
contains
(
const
AxisAlignedBoundingBox
&
bb
)
const
;
bool
partiallyContains
(
const
AxisAlignedBoundingBox
&
bb
)
const
;
float
size
()
const
;
Vec3
center
()
const
;
Vec3
minBound
()
const
;
Vec3
maxBound
()
const
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment