#jogamp @ irc.freenode.net - 20150308 05:05:36 (UTC)


20150308 05:05:36 -jogamp- Previous @ http://jogamp.org/log/irc/jogamp_20150307050536.html
20150308 05:05:36 -jogamp- This channel is logged @ http://jogamp.org/log/irc/jogamp_20150308050536.html
20150308 07:31:45 * hharrison (~chatzilla@anon) Quit (Ping timeout: 265 seconds)
20150308 08:55:35 <zubzub> how would one implement a type safe coordinate/transformation matrix in java?
20150308 08:56:07 <zubzub> I was thinking of Vec<T> with T being the space where the vector 'lives'
20150308 08:56:38 <zubzub> and Mat<T,U> with T being the 'input' space and U the 'output' space
20150308 08:56:45 <zubzub> however I have one problem
20150308 08:57:01 <zubzub> that types of 'spaces' can have different instances
20150308 08:57:18 <zubzub> and different spaces with the same type are not the same..
20150308 08:58:59 <zubzub> so the generics solution only works on a certain level and provides nice compile time assurance
20150308 09:00:01 <zubzub> but I'd have to pass a specific space instance to Vec & Mat and do a runtime check if it's the same space instance
20150308 10:02:04 * monsieur_max (~maxime@anon) has joined #jogamp
20150308 10:30:51 <rmk0> zubzub: when can difference instances of the same space be different?
20150308 10:36:51 <rmk0> *different
20150308 10:48:49 <rmk0> i think i might know what you mean, but i'm not sure
20150308 11:01:31 * Eclesia (~eclesia@anon) has joined #jogamp
20150308 11:01:45 <Eclesia> hi
20150308 11:02:53 <rmk0> lo
20150308 13:06:55 <Eclesia> if only I knew the guy who invented the bug
20150308 14:10:59 <zubzub> rmk0: well in my case there's compositor space and surface (client space)
20150308 14:11:08 <zubzub> surface space lives as 'child' of compositor space
20150308 14:11:29 <zubzub> yet different surfaces have their space translated differently
20150308 14:11:44 <zubzub> compositor space is pretty static
20150308 14:11:51 <zubzub> surface spaces can come and go any time
20150308 14:13:58 <zubzub> (surface space instances are indepent from each other)
20150308 14:18:45 <zubzub> I'm creating an explorityitory lib here: https://github.com/Zubnix/automat
20150308 14:20:06 <rmk0> i see
20150308 14:21:05 <rmk0> yeah, don't think you can deal with that with java's type system
20150308 14:21:31 <rmk0> i think you'd need higher-rank types
20150308 14:21:37 <zubzub> yeah I'm afraid I'm stuck with runtime checking
20150308 14:21:42 <zubzub> higher-rank types?
20150308 14:22:04 <rmk0> https://wiki.haskell.org/Rank-N_types
20150308 14:22:04 <Eclesia> strange api you made
20150308 14:22:32 <zubzub> what's strange about it? p
20150308 14:22:52 <zubzub> it uses google auto value mind you ;)
20150308 14:22:59 <Eclesia> seems awfully complex for just vector and matrix ^^
20150308 14:23:38 <zubzub> I aim for easy-to-use and error-prone rather then performance
20150308 14:23:51 <zubzub> else I could simply use float arrays and be doen wit it
20150308 14:25:15 <rmk0> zubzub: have you seen my jtensors package?
20150308 14:25:48 <zubzub> no
20150308 14:25:57 <rmk0> i actually added type-indexed vectors and matrices a while back
20150308 14:26:00 <zubzub> shoot me a link and I'll have a look at it
20150308 14:26:10 <rmk0> http://mvn.io7m.com/io7m-jtensors/
20150308 14:26:19 <rmk0> http://fossil.io7m.com/repo.cgi/io7m-jtensors/artifact/6e2466cce9c79d5ba052f8aeafc0f2a55687446c
20150308 14:26:21 <zubzub> maybe it'll give me some insights
20150308 14:27:00 <rmk0> the type signatures get hairy for the 4x4 matrices... when it comes to adding two matrices, for example, the type system has no idea how the indices are related so the best you can really do is "here's six type parameters, they could mean anything"
20150308 14:27:06 <zubzub> I'm a bar right now, will investigate it this evening
20150308 14:27:24 <rmk0> it understands how the indices are transformed for multiplication, though
20150308 14:28:27 <rmk0> m1 : T0 → T1, m0 : T1 → T2, (m0 * m1) : T0 → T2, etc
20150308 14:29:17 <rmk0> i've used it in practice... has caught quite a few errors that would have been silent failure otherwise
20150308 14:36:34 <zubzub> the second link looks... extensive.
20150308 14:36:41 <rmk0> hehe
20150308 14:36:56 <zubzub> will take me some time to comprehend :)
20150308 14:37:07 <rmk0> probably best to look at the non-indexed versions first
20150308 14:37:19 <rmk0> is all just the ordinary matrix and vector operations
20150308 14:47:29 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20150308 14:49:27 * monsieur_max (~maxime@anon) has joined #jogamp
20150308 15:20:38 <Eclesia> deferred lights have a bunch of issues :/ mirrors, transparency
20150308 15:22:14 <rmk0> yeah, they can't do transparency
20150308 15:23:27 <Eclesia> no msaa either
20150308 15:23:58 <rmk0> nope
20150308 15:24:04 <Eclesia> :'(
20150308 15:29:00 <rmk0> prefer supersampling or antialiasing that can run as a postprocess, anyway
20150308 15:30:03 <Eclesia> never :p
20150308 15:30:15 <rmk0> http://www.iryoku.com/smaa/
20150308 15:32:45 <rmk0> i'm satisfied with fxaa
20150308 17:42:10 * zzuegg (~zzuegg___@anon) has joined #jogamp
20150308 18:15:12 * Eclesia (~eclesia@anon) has left #jogamp
20150308 18:37:16 * hharrison (~chatzilla@anon) has joined #jogamp
20150308 18:56:56 * Eclesia (~eclesia@anon) has joined #jogamp
20150308 18:57:50 * Eclesia (~eclesia@anon) Quit (Client Quit)
20150308 20:31:14 * mbien (~mbien@anon) has joined #jogamp
20150308 21:58:59 * hharrison (~chatzilla@anon) Quit (Ping timeout: 256 seconds)
20150308 22:21:39 * monsieur_max (~maxime@anon) Quit (Ping timeout: 250 seconds)
20150309 00:31:17 * hharrison (~chatzilla@anon) has joined #jogamp
20150309 02:45:19 <sgothel> ctor for gluegen Type .. @Harvey will love it :)
20150309 02:45:29 <sgothel> copy-ctor .. that is
20150309 02:46:01 <sgothel> GlueGen: just pushed another round of cleanup .. I guess thats it for now
20150309 02:47:08 <sgothel> need to include the same GL header in jogl now, so the func-ptr typedef's are available again, for implicit validation by c-compiler .. blablabla :)
20150309 03:42:23 * mbien (~mbien@anon) Quit (Ping timeout: 256 seconds)
20150309 04:13:58 <hharrison> Harvey loves it everytime a clone() goes away
20150309 05:05:36 -jogamp- Continue @ http://jogamp.org/log/irc/jogamp_20150309050536.html