liberty-engine ~master (2019-02-13T12:42:06Z)
Dub
Repo
Ray
liberty
math
shapes
struct
Ray (
T
int
N
)
if
(
N
== 2 ||
N
== 3
) {
alias
PointType
=
Vector
!(
T
,
N
)
;
PointType
origin
;
PointType
direction
;
PointType
progress
(T t);
static if
(
N == 3 && isFloatingPoint!T
)
bool
intersect
(Triangle!(T, 3) triangle, T t, T u, T v);
static if
(
N == 3 && isFloatingPoint!T
)
bool
intersect
(Plane!T plane, PointType intersection, T distance);
}
Members
Aliases
PointType
alias
PointType
=
Vector
!(
T
,
N
)
Functions
intersect
bool
intersect
(Triangle!(T, 3) triangle, T t, T u, T v)
intersect
bool
intersect
(Plane!T plane, PointType intersection, T distance)
progress
PointType
progress
(T t)
Variables
direction
PointType
direction
;
origin
PointType
origin
;
Meta
Source
See Implementation
liberty
math
shapes
aliases
FrustumD
FrustumF
PlaneD
PlaneF
Ray2D
Ray2F
Ray2I
Ray3D
Ray3F
Ray3I
RectD
RectF
RectI
Segment2D
Segment2F
Segment2I
Segment3D
Segment3F
Segment3I
Sphere2D
Sphere2F
Sphere2I
Sphere3D
Sphere3F
Sphere3I
Triangle2D
Triangle2F
Triangle2I
Triangle3D
Triangle3F
Triangle3I
enums
FrustumScope
FrustumSide
structs
Frustum
Plane
Ray
Rect
Segment
Sphere
Triangle