Hello Daniel!

On Sat, Jun 20, 2015 at 11:40 PM, Daniel Roßberg <danielmrossb...@gmail.com>
wrote:

> Kalpit,
>
> Why are you using an unspecific, for command line arguments parsing
> designed API for an internal function?  Wouldn't it be better to have
> a functionality specific interface like for example
> analyze_obj_inside()?
>

Oh yes, my bad. I will have the function *analyze_volume() *(in
libanalyze's volume.c) taking the parameters : (struct ged * gedp, fastf_t
*volume, rt_db_internal *ip) -- which can be called from
*analyze_obj_insize() *using a functab, which will be there in *analyze.c*.
This function *analyze_obj_insize() *will be called from *analyze_do() *and
hence our primary aim of "analyze" being the API's customer will be served.
Am I getting this right now? :)

Actually, I thought about not passing the *struct ged* in *analyze_volume()
*but it seems that I won't be able to get a raytracing instance without the
database instance provided by the *struct ged*. If there is any way in
which I can convert an internal db structure to a database instance, there
is no need to pass the *struct ged *I guess. Everything else will remain
the same for now.

I will put the code that forms a *"raytracing context" *as a separate .c
file, and write a header or two for the functions in the final public API.
Sounds good? :)

With Regards,
Kalpit Thakkar

>
>
> 2015-06-19 19:24 GMT+02:00 Kalpit Thakkar <ceasy...@gmail.com>:
> > Hello!
> >
> > I had been trying to write the implementation for volume already and
> here is
> > it's first implementation. I haven't kept API design in mind right now as
> > you can see in there, but this one is just to make sure I'm following the
> > logic correctly or not. Please have a look.
> >
> > volume implementation :
> > https://gist.github.com/dracarys-stormborn/c894daa679fb670892c8
> > A header having the structures defined :
> > https://gist.github.com/dracarys-stormborn/5f64359e90334728df70
> >
> > This is a very very naive implementation right now. But things are slowly
> > getting clearer to me and analysis on this will make it much clearer. :)
> >
> > With Regards,
> > Kalpit Thakkar
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> BRL-CAD Developer mailing list
> brlcad-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>
------------------------------------------------------------------------------
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to