Is it okay to extend the Vector* / Box2d structs and post a SVN patch here? I need some functionality , which I would like to implement directly and contribute to the project.
Feel free to extend Vector*! Patches always welcome.
Regarding Box2, I'm starting to think this struct might have been a bad idea on my part. System.Drawing.Rectangle and Region cover the same things (more or less) - take a look there first, to see if they cover what you need?
Also, may I ask what kind for a rough idea of the functionality you need? The reason I'm asking is that I've been slowly merging a patch by JTalton, which adds several juicy bits to Vector* and Matrix*.
Indeed I am using Rectangle instead of Box2 at the moment, because it offers a more extensive interface. But I want to avoid a using of System.Drawing in code where OpenTK.Math is used (which offers Box2) to keep it straight. So I would like to extend the interface of Box2 a little. It's also OK if you drop the Box2 struct.
For Vector2 I need:
publicstaticVector2 One = newVector2(1, 1); publicVector2 RightNormal(); publicVector2 LeftNormal();
It is not that much at the moment. But I wrote some vector arithmetic classes / structs a while ago and maybe I could extend OpenTK.Math with my functionality.
But If you say, that JTalton's patches covers the above three methods / properties, I will wait until you finished.
???
I read in the instructions.txt about "Bulid.exe vs", but it builts a Visual Studio 2005 solution, which needs to be converted to 2008. Thanks for the info, but I was asking if it is possible to build Visual Studio 2008 project files directly.
Should I wait with my patches until you finished merging the current patches?
@teichgraf There is already the property 'Perpendicular' .. i think this is want you want (but without the distinction between right an left normal)
------
A few days ago a added a Rotate function to Vector2. There is already a Rotate function in Vector2d, but there is one big difference: Functions within Vector2d and Vector3d always expect angles (in degrees), but imo the angle parameters should always expect it to be in radians. This is the standard approch for math libraries. In any case this should be consistent.
Then i added the functions RotateX, RotateZ and RotateY to Vector3. All functions have a static alternative.
@Fiddler:
To avoid double stuff, I'll wait with my patch until you managed to add georgs patches. Please give me an info when you commited it to the repository.
Comments
Mar 13
22:27:00Re: Extend OpenTK
posted by the FiddlerFeel free to extend Vector*! Patches always welcome.
Regarding Box2, I'm starting to think this struct might have been a bad idea on my part. System.Drawing.Rectangle and Region cover the same things (more or less) - take a look there first, to see if they cover what you need?
Also, may I ask what kind for a rough idea of the functionality you need? The reason I'm asking is that I've been slowly merging a patch by JTalton, which adds several juicy bits to Vector* and Matrix*.
Mar 14
09:52:23Re: Extend OpenTK
posted by teichgrafIndeed I am using Rectangle instead of Box2 at the moment, because it offers a more extensive interface. But I want to avoid a using of System.Drawing in code where OpenTK.Math is used (which offers Box2) to keep it straight. So I would like to extend the interface of Box2 a little. It's also OK if you drop the Box2 struct.
For Vector2 I need:
public Vector2 RightNormal();
public Vector2 LeftNormal();
It is not that much at the moment. But I wrote some vector arithmetic classes / structs a while ago and maybe I could extend OpenTK.Math with my functionality.
But If you say, that JTalton's patches covers the above three methods / properties, I will wait until you finished.
???
Mar 14
10:10:13Re: Extend OpenTK
posted by teichgrafI just checked out the repository (trunk) from sourceforge. Is there a way to build the project files for Visual Studio 2008?
Mar 14
10:13:00Re: Extend OpenTK
posted by the FiddlerYes, open cmd and head to the Build/ folder. Then type "Bulid.exe vs" to generate a VS solution.
Mar 14
10:27:12Re: Extend OpenTK
posted by georgwaechterhi,
i also plan to contribute additional Vector* patches, for example for methods that Vector3d has, but Vector3 not .... i will post more details later
georg
Mar 14
10:29:59Re: Extend OpenTK
posted by the FiddlerThe single precision versions will get all the features double precision versions have. I'm slowly merging differences back and forth.
Mar 14
10:35:30Re: Extend OpenTK
posted by teichgrafI read in the instructions.txt about "Bulid.exe vs", but it builts a Visual Studio 2005 solution, which needs to be converted to 2008. Thanks for the info, but I was asking if it is possible to build Visual Studio 2008 project files directly.
Should I wait with my patches until you finished merging the current patches?
Mar 14
10:41:40Re: Extend OpenTK
posted by the FiddlerNo, it's not possible (not supported by Prebuild).
No, build your patches (I'm working on OpenAL right now, so they won't conflict).
Mar 14
13:56:16Re: Extend OpenTK
posted by teichgrafWhen the patch is finished, how should I deliver it? Post a topic or through sourceforge?
Mar 14
13:55:45Re: Extend OpenTK
posted by the FiddlerJust attach it to this topic.
Mar 14
22:25:29Re: Extend OpenTK
posted by georgwaechter@teichgraf There is already the property 'Perpendicular' .. i think this is want you want (but without the distinction between right an left normal)
------
A few days ago a added a Rotate function to Vector2. There is already a Rotate function in Vector2d, but there is one big difference: Functions within Vector2d and Vector3d always expect angles (in degrees), but imo the angle parameters should always expect it to be in radians. This is the standard approch for math libraries. In any case this should be consistent.
Then i added the functions RotateX, RotateZ and RotateY to Vector3. All functions have a static alternative.
New is the method CalculateAngle for Vector3 ...
here are the changes: http://trackplanner.de/files/Math.patch
Mar 15
08:37:15Re: Extend OpenTK
posted by teichgraf@georg:
Thanks for the info and the extension.
I agree, that all angles should be handled consistent in radians.
For my project I am using the binaries of OTK 0.9.0 and there was no
Perpendicularproperty. The comment for this prop should be more obviously/// Gets the perpendicular vector on the right side of this vector.
/// </summary>
public Vector2 Perpendicular
instead of
/// Gets the perpendicular vector.
/// </summary>
public Vector2 Perpendicular
@Fiddler:
To avoid double stuff, I'll wait with my patch until you managed to add georgs patches. Please give me an info when you commited it to the repository.
Mar 15
08:40:35Re: Extend OpenTK
posted by the FiddlerOki.