Advertisement Jump to content
  • Advertisement

heron3d

Member
  • Content Count

    53
  • Joined

  • Last visited

Community Reputation

132 Neutral

About heron3d

  • Rank
    Member
  1. heron3d

    would you use a jump statement

    That is funny. His guidelines apply in my case. My goto will point forward and will make my code incredibly more easy to understand and it is only used once. I've decided. thanks. gamedev.net rocks
  2. I've reached a point is my code where it would be tempting to use a go to: label. Labels have always been frowned upon and this makes me hesitate using them. I want to make it a habit of writing good code and I'm really at an impasse here. On the one hand, there is the convention and on the other the technical drawbacks. I think if there are no technical drawbacks I would go against convention in this case. How do you pros feel about labels? And are there any technical drawbacks to using jump statements of this kind? Thanks in advance Nikos
  3. Thank you for all the responses guys. A function it is. N
  4. I'm considering making a macro that is 27 lines long with a 8 character name. It is all trigonometry stuff that I use over and over again within the same iteration. I'm thinking of doing this in order to avoid writing a function to make my program run faster. Do you guys think this is a good idea?
  5. heron3d

    Define a plane knowing a point and the normal

    could you get the cross product between your ray and the world up vector and then the cross product of that vector with the ray ray X worldUpVec = U ray X U = V plane defined by the point in 3d space, U and V. perhaps
  6. Thank you, luca-deltodesco. absolutely love it!
  7. I'm having a little trouble visualizing your variables. Would it be too much trouble to request a diagram?
  8. Where does it say one of the end points has to be the origin? [/quote] It doesn't say but my tests show that it is a ray line intersection equation not a line to line intersection NOR a segment to segment intersection equation. But the fact that it can show me the intersection at any point along the infinite line works to my advantage. I just wish the first line didn't have to be a ray at the origin. Here is a sample of my tests.
  9. so I got this equation to check for intersection: http://en.wikipedia.org/wiki/Line-line_intersection the problem with this is that creates an accurate intersection ONLY if the first segment has an origin of (0, 0). Is that how all line intersection equations work or should I find one that does not have a zero origin as a requirement?
  10. heron3d

    Circle line intersection time

    http://en.wikipedia.org/wiki/Line%E2%80%93sphere_intersection you can also do a "sphere line intersection" search in this forum and find the equation that does the trick. I ran into the same challenge myself about a year ago.
  11. excellent! thank you HappyCoder.
  12. when you say projection matrix are you referring to the camera's transformation matrix?
  13. This one is for the math gurus out there. I have 2 starting points and 2 direction vectors with variable magnitudes in 3d space. How would I check if the vectors criss cross from the view point of an arbitrary camera angle? heron
  14. Thank you for all your great replies. It is a really big help. Nikos I will digest the information and see what comes out the other end:)
  • 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!