From: Branan R. <br...@gm...> - 2008-08-25 20:53:16
|
Double won't be added until the hardware supports it, so there won't be any time wasted. I'm also OK with the longer names. On Mon, Aug 25, 2008 at 1:44 PM, Mars_999 <ma...@si...> wrote: > glmVecSet2f > glmVecAdd2f > glmVecLength2f > glmVecTransform2f > glmMatSet2f > glmMatIdentity2f > > I vote for this. > > Correct, in mathematics vectors aren't defined, but I was thinking ahead for > colors or other uses, having these would be nice, but anyone who is coding > graphics should understand this already? > > Also don't forget to put in a glmVecScale2f? I guess we could put double in > but, IIRC double was going to get dropped? And we aren't doing OpenCL or > CUDA here AFAIK, so double would kind of wasteful in terms of time spent. > > ----- Original Message ----- > From: Henri Häkkinen > To: gls...@li... > Sent: Monday, August 25, 2008 3:17 PM > Subject: Re: [Glsdk-devel] [GLm] api > We are currently using floats, but may want to reserve the possibility of > havings doubles too. Therefore we use the -f postfix. This is also the GL > convention of doing things: > > glVertex2f > > and therefore we have: > > glmVecSet2f > > instead of: > > glmVec2Set > > Also, we don't have glmVecDiv or glmVecMul. Why? Because vector division or > multiplication are not defined in linear-algebra. There are two kinds of > vector products: cross and dot. These are handled by the -Cross and -Dot > entry points. Member-wise div or mul are not mathemtically defined > operations in vector calculus AFAIK. > > We have now several open issues with the GLM API: > > 1) Should we provide -Mul and -Div for vectors? > My opinion: no, as they are not defined in mathematics and they generally > are not needed > > 2) Should we use short naming convention or is the current convention fine? > > The current convention is, for example: > > glmVecSet2f > glmVecAdd2f > glmVecLength2f > glmVecTransform2f > glmMatSet2f > glmMatIdentity2f > > The proposed short convention would be, for example: > > glmVecLen2f > glmVecTrans2f > glmMatIdent2f > glmMatDet2f > > 3) Should we drop the -f postfix, or should we keep it for future possible > double types?, > > glmVecSet2f (the current API) vs. glmVecSet2 (the proposed) > > My opinion: we should keep the -f, it is more OpenGL-like and we reserve the > possibility of -d > > 4) Should we have the dimension of the type in the end of the entry-point > (like in OpenGL) or in the middle? > > glmVecSet2f (the current API) vs. glmVec2Setf (the proposed) > > My opinion: glmVecSet2f, it is more OpenGL-like > > > Issues are open for discussion. Please comment. > > > > On Mon, Aug 25, 2008 at 10:10 PM, Mars_999 <ma...@si...> wrote: >> >> I haven't looked at the lib yet, but aren't we just going to work with >> floats all the time? >> >> glmVec2Sub >> glmVec3Sub >> glmVec4Sub >> >> glmVec2Add >> glmVec3Add >> glmVec4Add >> >> glmVec2Mul >> glmVec2Div >> >> glmVec2Norm >> glmVec2Transf >> glmVec3Cross >> glmVec3Dot >> >> I like that format... >> >> ----- Original Message ----- >> From: Henri Häkkinen >> To: glsdk-devel >> Sent: Monday, August 25, 2008 2:04 PM >> Subject: [Glsdk-devel] [GLm] api >> The GLM API seems at this moment to use two sets of naming styles. Compare >> these two for example: >> >> glmVecSub2f >> glmVecLength2f >> >> The first function is using a short form for the operation ('sub' as from >> 'substract') while the other is using long form. Should we simplify the API >> to look like this: >> >> glmVecSub2f >> glmVecLen2f >> >> Althought on the other hand, how do we shorten such stuff as Normalize, >> Transform, Identity, Inverse? This does not necessary look good: >> >> glmVecNorm >> glmVecTrans >> glmMatTrans >> glmMatInv >> glmMatIdent >> >> Is this even a big issue? Comments? >> >> If we decide to keep the API as it is now, I think we should lock it in >> and begin to outline the API reference for it. For later versions, I would >> like to implement such stuff as colors, quaternions and maybe planes and >> matrix stacks but this can wait. Bigger priority is to get the current >> version working and tested for. >> >> For Korval: I outlined some API ref in a plain text format. You may find >> it in 'docs/sdk_reference/glm-apiref' in the latest revision. You may use >> this as ideas for the DocBook API ref and this file needs to get removed >> once you migrate it into DocBook. >> >> -- >> Henri 'henux' Häkkinen >> >> ________________________________ >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> >> ________________________________ >> >> _______________________________________________ >> Glsdk-devel mailing list >> Gls...@li... >> https://lists.sourceforge.net/lists/listinfo/glsdk-devel >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Glsdk-devel mailing list >> Gls...@li... >> https://lists.sourceforge.net/lists/listinfo/glsdk-devel >> > > > > -- > Henri 'henux' Häkkinen > > ________________________________ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > ________________________________ > > _______________________________________________ > Glsdk-devel mailing list > Gls...@li... > https://lists.sourceforge.net/lists/listinfo/glsdk-devel > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Glsdk-devel mailing list > Gls...@li... > https://lists.sourceforge.net/lists/listinfo/glsdk-devel > > |