1e73d839f3
Get rid of some dead code in reader_yaml.cc
2014-08-20 10:08:08 -07:00
0ab3e17467
Objects need to be translated by their negation
...
Translating by the negation of the given vector puts them in the right place from the ray's perspective. Without the negation, things are mirrored.
2014-08-20 10:06:22 -07:00
301f5ff9aa
Use ToObjectSpace and FromObjectSpace for ray components
2014-08-20 10:05:17 -07:00
07e75c663d
Convert normal from object to world space
...
Properly doing this is a bit more complicated because it has to be normalized and pointing in the right direction. Just applying the inverse of the transform matrix doesn't quite do it.
2014-08-20 10:04:38 -07:00
6706623d6f
Manually initialize Vector4 instead of using bzero
2014-08-18 09:04:26 -07:00
df5e4fe049
Initialize Camera::mOrigin
...
Whoops...
2014-08-18 09:04:11 -07:00
7c12a8bc2b
Return a Color by value from Light::Contribution()
2014-08-18 09:02:13 -07:00
917b74003a
Declare overrides for Box methods
2014-08-16 20:45:06 -07:00
0a43eb81aa
Explicitly declare overrides in Sphere
2014-08-16 20:36:02 -07:00
791fdaa14a
Use the Vector4 version of Matrix4::Translation for object origins
2014-08-16 20:35:49 -07:00
d518d282d4
Notes in Matrix4 about using std::copy
...
Not entirely sure what it does, but it's standard C++… :shrugs:
2014-08-16 20:35:01 -07:00
10195c607c
operator<< for pretty-printing an entire Matrix4
2014-08-16 16:57:58 -07:00
3a846ec282
Add -n option for "should render"
2014-08-16 08:52:40 -07:00
7e3cc3c3ed
Copy properties of log tracer
...
The log tracer needs to copy its parameters, otherwise weird things happen.
2014-08-16 08:33:12 -07:00
c45d698424
Get a column vector of a matrix
2014-08-16 00:43:43 -07:00
050d87bd6f
Place an object by its origin (only applies to spheres)
2014-08-15 22:33:34 -07:00
bbbac6ff92
Fix up Object object space conversions
...
- Ray directions shouldn't be translated
- Implement vector translation to global space
2014-08-15 22:33:22 -07:00
8af03c3f3d
Implement Object::Place
...
Places the object by manipulating its translation matrix.
2014-08-15 22:32:44 -07:00
97b37d3c53
Just little tweaks
...
Mostly style, also the name of the Transposed() function -> Transpose().
2014-08-11 07:58:47 -07:00
56fff1178e
ToObjectSpace copies the Ray anyway, so pass by value
2014-08-10 16:58:05 -07:00
4d4dc91ff4
Add Matrix4 Inverse and Transpose
...
Transpose is easy, with a bool flag to determine whether to access elements in row-major or column-major format. Inverse is more difficult, so this change only does translation inverses.
2014-08-10 16:57:34 -07:00
dd36ab6fe1
Fill in missing Matrix4 symbols
2014-08-10 11:39:25 -07:00
620d5a5bc6
Fill in missing Vector4 symbols
...
Add assignment and call operators, bool operators, etc
2014-08-10 11:38:55 -07:00
49d097a803
Get rid of Matrix<N,M>, just use Matrix4
2014-08-10 10:51:12 -07:00
30d0570010
Add TooFar to util.hh
2014-08-10 10:49:45 -07:00
990d2b4c11
Add basics/util.hh
...
A place for NearZero, etc
2014-08-10 10:48:54 -07:00
74bbc87610
Trying to get this copy/move thing right between matrices and vectors
2014-08-10 09:42:02 -07:00
a5f451a120
Basics unit tests found some bugs!
2014-08-09 22:00:54 -07:00
1f01de6393
Remove VectorParser and ColorParser destructors
...
They weren't being used.
2014-08-09 22:00:43 -07:00
505a77d0e2
LOG_TRACE YAML events
2014-08-09 22:00:23 -07:00
c90c545f40
Define color constants
2014-08-09 21:30:28 -07:00
bf91fff5a2
More compiler fixups
2014-08-09 21:23:11 -07:00
43c8bd95c6
Remove basics.cc from the build
2014-08-09 21:22:40 -07:00
a97e7a6d2e
Lights get virtual destructor and correct types
2014-08-09 21:22:12 -07:00
bb789476b6
New basics gets the remainder of the stuff from old basics
...
EPSILON, MAX_DISTANCE, NearZeor, NearlyEqual, TooFar.
2014-08-09 21:21:57 -07:00
6c23fa9f32
Get rid of the old basics!
2014-08-09 21:21:27 -07:00
ef9b9d04c8
Put all the parsers in the charles namespace
2014-08-09 20:53:04 -07:00
b7a9f07d5e
Lots of little niggling compiler errors
2014-08-09 20:46:26 -07:00
3a8c955796
Put the readers and writers in charles namespace
2014-08-09 20:46:14 -07:00
84cb27fa6f
Allow passing intensity in PointLight constructor
2014-08-09 20:45:45 -07:00
c3da70cdd9
Clean up some dependencies between scene, material, and color
2014-08-09 20:34:23 -07:00
48e35dfc81
Update material.{cc,hh}
2014-08-09 20:31:18 -07:00
42bef33775
Get rid of Color implementation in old basics.cc
2014-08-09 20:24:45 -07:00
b001ad2cf2
light.hh include in scene.hh
2014-08-09 20:24:18 -07:00
f6680f993f
Clean up includes and old code in charles.cc
2014-08-09 20:24:11 -07:00
161a635ab5
reader.hh
...
Fix up includes, put it in charles namespace
2014-08-09 20:24:00 -07:00
080ee0d580
Remove Color and Vector3 from old basics
2014-08-09 20:23:23 -07:00
3c3e707922
Light has a shared_ptr type, and an overridable Contribution()
2014-08-09 20:23:08 -07:00
acdfb0fb60
Add PointLight in lightPoint.cc
2014-08-09 20:22:35 -07:00
e1ded8a9ad
Clean up for Lights (and AmbientLights)
2014-08-09 20:04:42 -07:00