Design new API function to reduce duplication #2BRL-CAD
Status: ClosedTime to complete: 100 hrs Mentors: Popescu Andrei, Jacob BTags: C, code, API, design

This task involves designing a new function that will measurably help reduce code duplication. You'll need to have already identified a piece of duplicated code that needs to be refactored and/or modified.

This task involves writing just the header file declaration and a doxygen comment that fully describes how the function behaves. It is your responsibility to make sure that the return types and function arguments are well thought out, fit well with our existing conventions, and is a clean simple yet effective design. Think it through.

Submit a patch file with your change, modifying the corresponding public include/header file that goes with the library being modified.

Note candidate libraries to modify are our core libraries:

  • libbu for basic utility functions
  • libbn for basic math and simple geometry functions
  • librt / libnmg / libbrep for more complicated geometry functions
  • libanalyze for analysis functions
  • libged for geometry editing (commands)
  • ... see src/README for a brief listing
Uploaded Work
File name/URLFile sizeDate submitted
task-58-rt_gen_public_api.diff3.7 KBJanuary 16 2015 15:54 UTC
rt_gen_api_readme.txt1.1 KBJanuary 16 2015 15:55 UTC
task-58-rt_gen_public_api-v2.tar.gz2.1 KBJanuary 16 2015 16:43 UTC
task-58-rt_gen_public_api-v2.tar.gz2.1 KBJanuary 16 2015 16:45 UTC
Comments
Andromeda Galaxyon January 16 2015 15:31 UTCTask Claimed

I would like to work on this task.

Harmanpreet on January 16 2015 15:37 UTCTask Assigned

This task has been assigned to Andromeda Galaxy. You have 73 hours to complete this task, good luck!

Andromeda Galaxyon January 16 2015 15:55 UTCReady for review

The work on this task is ready to be reviewed.

Sean on January 16 2015 16:06 UTCtime to digest

It'll take a bit to digest everything going on in here, but on the surface it looks workable but needing reduction.  Just to pick one needle out of the haystack, I'm not sure I see the value in rt_ray_bundle_set() or rt_ray_bundle_next_n_rays() needing to exist.  I know those are your streamers, but they're functionally no different than rt_ray_bundle_get_n_rays().  A streaming API is something of a different beast altogether.


I also don't think you should follow suit like some of our other structs and expose private data in the API.  Better is a declared private structure or a simple void* or other hiding mechanism that is defined by a private header and only known to the implementations.  The entire caching mechanism belongs in there.


 

Sean on January 16 2015 16:06 UTCTask Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

Andromeda Galaxyon January 16 2015 16:46 UTCReady for review

The work on this task is ready to be reviewed.

Popescu Andrei on January 16 2015 17:39 UTCTask Closed

Congratulations, this task has been completed successfully.