CubbyFlow v0.71
Core
Ray
Ray3-Impl.h
Go to the documentation of this file.
1
/*************************************************************************
2
> File Name: Ray3-Impl.h
3
> Project Name: CubbyFlow
4
> Author: Dongmin Kim
5
> Purpose: Class for 3-D ray.
6
> Created Time: 2017/03/25
7
> Copyright (c) 2018, Dongmin Kim
8
*************************************************************************/
9
#ifndef CUBBYFLOW_RAY3_IMPL_H
10
#define CUBBYFLOW_RAY3_IMPL_H
11
12
namespace
CubbyFlow
13
{
14
template
<
typename
T>
15
Ray<T, 3>::Ray
() :
16
Ray
(
Vector3
<T>(),
Vector3
<T>(1, 0, 0))
17
{
18
// Do nothing
19
}
20
21
template
<
typename
T>
22
Ray<T, 3>::Ray
(
const
Vector3<T>
& newOrigin,
const
Vector3<T>
& newDirection) :
23
origin(newOrigin), direction(newDirection.Normalized())
24
{
25
// Do nothing
26
}
27
28
template
<
typename
T>
29
Ray<T, 3>::Ray
(
const
Ray
& other) :
30
origin(other.origin), direction(other.direction)
31
{
32
// Do nothing
33
}
34
35
template
<
typename
T>
36
Vector3<T>
Ray<T, 3>::PointAt
(T t)
const
37
{
38
return
origin + t * direction;
39
}
40
}
41
42
#endif
CubbyFlow::Vector< T, 3 >
3-D vector class.
Definition:
Vector3.h:26
CubbyFlow::Ray
Class for ray.
Definition:
Ray.h:23
CubbyFlow
Definition:
pybind11Utils.h:24
Generated on Sun Apr 22 2018 23:43:22 for CubbyFlow by
1.8.14