![]() |
Divide Framework 0.1
A free and open-source 3D Framework under heavy development
|
#include <IntersectionRecord.h>
Public Member Functions | |
IntersectionRecord () noexcept | |
IntersectionRecord (vec3< F32 > hitPos, vec3< F32 > hitNormal, Ray ray, D64 distance) noexcept | |
IntersectionRecord (BoundsComponent *hitObject) noexcept | |
Creates a new intersection record indicating whether there was a hit or not and the object which was hit. | |
void | reset () noexcept |
Reset all information contained by this record. | |
bool | operator== (const IntersectionRecord &otherRecord) const noexcept |
check the object identities between the two intersection records. If they match in either order, we have a duplicate. | |
bool | isEmpty () const noexcept |
Public Attributes | |
vec3< F32 > | _position |
This is the exact point in 3D space which has an intersection. | |
vec3< F32 > | _normal |
This is the normal of the surface at the point of intersection. | |
Ray | _ray |
This is the ray which caused the intersection. | |
BoundsComponent * | _intersectedObject1 |
This is the object which is being intersected. | |
BoundsComponent * | _intersectedObject2 |
This is the other object being intersected (may be null, as in the case of a ray-object intersection) | |
D64 | _distance = 0. |
bool | _hasHit = false |
Definition at line 42 of file IntersectionRecord.h.
|
noexcept |
Definition at line 9 of file IntersectionRecord.cpp.
|
noexcept |
Definition at line 17 of file IntersectionRecord.cpp.
|
noexcept |
Creates a new intersection record indicating whether there was a hit or not and the object which was hit.
Definition at line 32 of file IntersectionRecord.cpp.
|
inlinenoexcept |
Definition at line 76 of file IntersectionRecord.h.
|
noexcept |
check the object identities between the two intersection records. If they match in either order, we have a duplicate.
Definition at line 49 of file IntersectionRecord.cpp.
|
noexcept |
Reset all information contained by this record.
Definition at line 40 of file IntersectionRecord.cpp.
D64 Divide::IntersectionRecord::_distance = 0. |
This is the distance from the ray to the intersection point. You'll usually want to use the nearest collision point if you get multiple intersections.
Definition at line 69 of file IntersectionRecord.h.
bool Divide::IntersectionRecord::_hasHit = false |
Definition at line 71 of file IntersectionRecord.h.
BoundsComponent* Divide::IntersectionRecord::_intersectedObject1 |
This is the object which is being intersected.
Definition at line 63 of file IntersectionRecord.h.
BoundsComponent* Divide::IntersectionRecord::_intersectedObject2 |
This is the other object being intersected (may be null, as in the case of a ray-object intersection)
Definition at line 65 of file IntersectionRecord.h.
This is the normal of the surface at the point of intersection.
Definition at line 59 of file IntersectionRecord.h.
This is the exact point in 3D space which has an intersection.
Definition at line 57 of file IntersectionRecord.h.
Ray Divide::IntersectionRecord::_ray |
This is the ray which caused the intersection.
Definition at line 61 of file IntersectionRecord.h.