Commit Graph

130 Commits

Author SHA1 Message Date
hasufell a9bd5ae144
Fix doxygen file comment 2014-05-16 20:20:42 +02:00
hasufell cd864fa1ba
Move half-edge assembler to separate .c file 2014-05-16 20:10:43 +02:00
hasufell dfd978f714
Refactor parse_obj() and move some subroutines to new functions 2014-05-16 19:57:43 +02:00
hasufell 0ecd0d8e9f
Merge branch 'master' into refactor
Conflicts:
	src/half_edge.c
2014-05-16 19:15:29 +02:00
hasufell f62e280cea
Reimplement dummy-edge logic
This will also work for more complex structures such as
testscube2_mitSpitze_offen.obj.
2014-05-16 19:04:38 +02:00
hasufell 8ec744867c
Remove obsolete usleep call in gl_draw.c 2014-05-16 15:09:27 +02:00
hasufell 69dc76a59e
Finalize consistency tests 2014-05-16 15:08:51 +02:00
hasufell 49dc760681
Merge branch 'master' into refactor 2014-05-16 14:53:47 +02:00
hasufell a2b604de2f
Finalize half-edge consistency tests 2014-05-16 01:11:21 +02:00
hasufell a3bac07c2b
Add fps counter (by Malte) 2014-05-16 00:32:38 +02:00
hasufell 15e5ab1c23
New fill_vertices() method, simplify some data types 2014-05-16 00:15:29 +02:00
hasufell 491a5fbe91
Finish up the new parsing modules 2014-05-15 22:42:22 +02:00
hasufell 23dbcf2c58
Improve allocation logic 2014-05-15 19:04:51 +02:00
hasufell 242af84c99
Remove obsolete macro
It is already in half_edge.c and since it refers to a static
function it has no place here.
2014-05-15 18:52:52 +02:00
hasufell aaa485f072
Try to fix normals for open edges
Probably still not correct, depending on the complexity
of the object.
2014-05-15 18:52:28 +02:00
hasufell 3687646974
Fix include order 2014-05-15 18:51:48 +02:00
hasufell baed4a52f8
Fix inline comment 2014-05-15 18:51:41 +02:00
hasufell 307df91fcf
Use REALLOC macro for improved readability 2014-05-15 18:50:57 +02:00
hasufell a4026b63e6
Fix doxygen comment 2014-05-15 18:34:07 +02:00
hasufell fd9d15c4ea
Add more user controls, draw faces as separate polygons
This also fixes drawing of open objects.
2014-05-15 18:33:43 +02:00
hasufell 6ceeff5a7b
First try of consistent half-edge struct test 2014-05-14 01:40:39 +02:00
hasufell 1bd4bfa1b7
Fix face assignments 2014-05-13 23:28:47 +02:00
hasufell 7650f83c36
Fix memory leak 2014-05-13 21:43:56 +02:00
hasufell c6e84bb7f5
Improve inline doc 2014-05-13 20:26:36 +02:00
hasufell 07a2827c2f
Improve inline comments 2014-05-13 20:16:33 +02:00
hasufell 33408e5e46
Add is_null_vector() function 2014-05-13 20:09:32 +02:00
hasufell e4bad92195
Implement acceleration structure 2014-05-13 20:09:16 +02:00
hasufell b3b5c84d1c
Cosmetics 2014-05-13 14:05:10 +02:00
hasufell 5b53950def
More error handling improvements 2014-05-13 14:05:02 +02:00
hasufell a1d3c3947e
Improve error handling
Basically be less fault tolerant. Added a lot of upper-case function
macros to use for fault-intolerant calls.
2014-05-13 13:47:13 +02:00
hasufell a7c3fe4f82
Improve doxygen comments 2014-05-13 00:53:12 +02:00
hasufell 563b0a5814
Simplify condition 2014-05-12 23:38:27 +02:00
hasufell d408b37eab
Draw normals in red 2014-05-12 23:02:22 +02:00
hasufell fe2698470a
Improve normal calculation
Should now also work on more complex polygons with more than 3 adjacent
faces. Also allows us to get the face normals separately.
2014-05-12 23:02:10 +02:00
hasufell 4dade4ff2c
Fix doxygen comments 2014-05-12 21:00:31 +02:00
hasufell e3496117ab
Cleanup 2014-05-12 20:59:34 +02:00
hasufell 58d4eb474e
Improve inline comments 2014-05-12 20:55:16 +02:00
hasufell 0fc3212f5a
Use fluorescent colors for the object 2014-05-12 20:55:02 +02:00
hasufell 6f678ccfe6
Cleanup 2014-05-12 20:20:17 +02:00
hasufell da36cd20da
Implement vertex normals 2014-05-12 20:20:03 +02:00
hasufell 146223a144
Allow rotating back and forth 2014-05-12 19:49:52 +02:00
hasufell 366da0177c
Add set_null_vector() function
Set the vector to a null vector.
2014-05-12 19:49:23 +02:00
hasufell 20d013c401
Improve error handling in copy_vector() 2014-05-12 19:49:01 +02:00
hasufell ce4032f0be
Use vector member in HE_vert struct 2014-05-12 19:48:46 +02:00
hasufell f2f4833392
Fix pair building 2014-05-12 19:46:26 +02:00
hasufell 29b8b410d6
Restructure find_center()
* return bool for success/failure
* use an out-vector to store the result
* fix tests
2014-05-11 14:02:34 +02:00
hasufell 965600ea01
Add missing doxygen 2014-05-11 13:34:19 +02:00
hasufell 5539384c37
Fix doxygen for tests 2014-05-11 13:31:50 +02:00
hasufell e1d18aad12
Restructure Makefiles
Use common.mk for basic toolchain settings and installation variables.
2014-05-10 23:51:45 +02:00
hasufell 8dd46fc2f6
Add tests for vector operations 2014-05-10 23:38:37 +02:00
hasufell 85b8bc0cbf
Fix error handling in vector.c 2014-05-10 23:38:25 +02:00
hasufell accf11ba6c
Add public functions to header 2014-05-10 23:38:10 +02:00
hasufell 723da9996d
Add tests for get_normalized_scale_factor() 2014-05-10 22:59:25 +02:00
hasufell 4c8bb37e56
Fix error handling in get_normalized_scale_factor() 2014-05-10 22:58:51 +02:00
hasufell 1fa87f9fbf
Add tests for find_center() 2014-05-10 22:49:36 +02:00
hasufell 1b97f290cf
Improve error handling in find_center() 2014-05-10 22:48:50 +02:00
hasufell f57dda9094
Add tests 2014-05-10 22:40:59 +02:00
hasufell fdb1271a39
Fix error handling in half-edge parser 2014-05-10 22:37:03 +02:00
hasufell c4b594b304
Fix spelling error 2014-05-10 21:06:36 +02:00
hasufell cf569224e0
Move some functions from gl_draw to half_edge
find_center() and get_normalized_scale_factor()
are not really related to drawing in it's own, but are
operation related to the HE_* structures
2014-05-10 21:05:08 +02:00
hasufell 4bcbb69fc7
Use more generic variable names in read_files() 2014-05-10 20:25:24 +02:00
hasufell 723155a2ce
Add add_vectors() and sub_vectors() 2014-05-10 20:17:12 +02:00
hasufell 2733b17af8
Add doxygen comment to main.c 2014-05-10 19:39:20 +02:00
hasufell 8e4da0763a
Fix doxygen comment 2014-05-10 19:34:43 +02:00
hasufell 7610843935
Add @file/@brief doc, merge parser into half_edge 2014-05-10 19:33:54 +02:00
hasufell c5c6c8b89a
Add half_edge.c for operations on half edge structures 2014-05-10 19:16:39 +02:00
hasufell d90d6f4bd1
Restructure files 2014-05-10 19:16:13 +02:00
hasufell 573b7f3f85
Fix doxygen comment 2014-05-10 18:39:15 +02:00
hasufell 8f8f5ad0a2
Add normalize_vector() function 2014-05-10 18:35:22 +02:00
hasufell 1df3195f37
Make vector_product() aliasing-safe 2014-05-10 18:19:26 +02:00
hasufell 7587b8058a
Improve doxygen comment 2014-05-10 18:19:02 +02:00
hasufell 9e7ff8dc4f
Add vec_math module 2014-05-10 17:34:25 +02:00
hasufell 17a52c4b89
Fix Makefile Objects 2014-05-10 17:33:31 +02:00
hasufell 71eae42e78
Improve function name, add static declaration 2014-05-09 19:52:21 +02:00
hasufell f68eaed204
Fix doxygen comment 2014-05-09 19:50:56 +02:00
hasufell d0dfba689b
Properly scale the objects before drawing 2014-05-09 19:47:05 +02:00
hasufell 6725dcf5ab
Make parameters const where possible 2014-05-09 17:53:25 +02:00
hasufell 7bc3d7230f
80 char limit 2014-05-09 17:53:16 +02:00
hasufell 9658f92b58
Rotate around the center of the object 2014-05-09 17:53:02 +02:00
hasufell 5bfce60f7e
Restructure file structure 2014-05-09 15:24:46 +02:00