Commit graph

30 commits

Author SHA1 Message Date
ecb15470ac Some tweaks to floating point utility methods
- Implement NearlyEqual
- NearZero and TooFar take const Double&
- NearZero and NearlyEqual are templated to take Double& and Double&& (and anything else that can be subtracted and/or passed into std::fabs.
2014-08-03 12:22:30 -07:00
8275c9baee Update header for basics.h 2014-08-03 12:18:53 -07:00
57f3154986 Add a NearZero for temporary values 2014-08-02 14:10:04 -07:00
0d4b700546 Add EPSILON, MAX_DISTANCE, and NearZero and TooFar 2014-08-02 12:19:46 -07:00
d44fa4dd2a Add Vector3::normalized()
Makes a copy of the vector, normalizes it, and returns it.
2014-08-02 10:00:00 -07:00
d69d708b31 Convert Vector3 to use Doubles 2014-07-22 20:46:10 -07:00
ca5cabb6ef Add LinearCombination for Vectors 2014-07-16 23:23:26 -07:00
c6b8b167ca Add operator<< overloads for Vector3, Ray, and Color 2013-09-22 10:15:41 -07:00
5d14a63c37 Add cross product operation to Vector3 2013-09-22 08:37:58 -07:00
fb6920e923 Add X, Y, and Z unit vectors 2013-09-20 09:10:55 -07:00
dea1967344 Add operator overloads for Color taking Color references 2013-09-13 18:23:25 -07:00
9fef3c33d2 Add RGB constructor to color 2013-09-13 14:10:52 -07:00
b631875246 Add operator== and operator!= to Vector3 2013-09-13 11:09:37 -07:00
da87ac8dd2 Add operator overloads for Colors and floats 2013-09-12 15:51:08 -07:00
4799a7fe49 Code formatting in basics 2013-09-12 15:00:26 -07:00
67cb6c9fea Implement operator overloads for Vector3 2013-09-12 14:59:33 -07:00
fcde85c642 Return *this after normalizing 2013-09-11 22:07:34 -07:00
c6c11ca95a Add operator*= to colors 2013-09-11 08:56:53 -07:00
6de49ae679 Add operator= to Vector3 and Color 2013-09-10 16:25:12 -07:00
f062efc349 Make Vector3 methods const 2013-09-10 15:34:08 -07:00
6ad2f16acd Comments for basics! 2013-09-09 23:03:41 -07:00
b973003a6b Convert basics to C++ 2013-09-09 22:47:19 -07:00
21ccba45e4 Clean up basics a bit; add vector_negate, ray_parameterize 2013-09-08 17:45:37 -07:00
7b30584ba5 Define ColorBlack 2013-09-07 22:12:35 -07:00
0c050734c7 Add vector_sub_vector and vector_dot to basics 2013-09-07 18:26:05 -07:00
4e27e4e960 Color is three unit8_t's instead of three floats 2013-09-06 23:03:25 -07:00
079ae98c9e Add a Ray object; initial bits of the tracer 2013-09-06 21:15:56 -07:00
6d253aab10 Add a Rect object 2013-09-06 19:01:02 -07:00
33c5e25f32 Add vector_{length2,length,normalize}() 2013-09-06 15:31:40 -07:00
296605f364 Add basics module 2013-09-05 22:54:45 -07:00