Slighty Behind Schedule

posted in Out Of The Ashes
Published April 20, 2014
Advertisement
I keep telling myself that this will be a weekly journal, but of course I am slightly behind schedule. and it seems more and more this is the position i find myself in when it comes to programming. So much to do and so little time.

I have made quite a bit of progress on things, but am working on many projects at once, so each is well, slightly behind schedule. I know I should stop and focus on just one, but variety is the spice of life, and it's doing wonders for my code base, poking holes and exposing weaknesses. It's also doing a lot for my own coding habits, as bouncing from project to project makes it hard to remember what i'm doing. So all my new work is getting nicely documented as I go, and I'm getting quite proficient at rereading my own old code and sussing it out quickly.

That being said, I am still not great at understanding others code. Take for example what I have been working with lately. One of the features of the project in the Image is determining draft based on displacement and hull form. The hull is a triangle mesh, and I can assign a displacement, though eventually this will be calculated from a structural drawing. I take the displacement, and starting with the entire hull, calculate the volume of the mesh(closed, but not necessarily convex) and then the mass of seawater that volume would hold(1.035g/cm[sup]3[/sup] for the curious). this is checked against the given displacement. if it is more than the displacement we step out, cut dy in half, and try again. if it is less, then it and the dy are accumulated until we are within either the draft tolerance or the displacement tolerance. It is working quite well ,as the text in the pictures show. The shader is not getting fed the correct draft to shade with, hence the cube doesn't look like it should. I'm going to fix that soon I'm just slightly behind schedule in regards to that.

The code for clipping against the plane was based on this paper by Dave Eberly. Reading though it now, the capping of clipped meshes appears to be incorrect, as the plane normal would be opposite of the normal of the close face if the mesh is in the positive space of the plane. after flipping a couple of -/+signs around, and rewriting it to use std::vector and my math library, I have it working but it *reads* wrong to me. for instance, the plane convention of ax+by+cz+d doesn't work because the plane is backwards from what was written in the article. I'm sure with enough coffee and scratch paper i could figure it out, but I'm slightly behind schedule as it is...


PS: if anyone cares to read that paper and tell me what is going on with the plane and close face feel free to reply or PM me
Previous Entry Looking forward
1 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

slow days...

1722 views

little steps

1790 views

Looking forward

1677 views

Happy Friday

1974 views

Monday blues

1756 views

and again...

1775 views
Advertisement