Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    13
  • comments
    5
  • views
    12996

Slighty Behind Schedule

Sign in to follow this  
Burnt_Fyr

997 views

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
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!