Axis based on 2 Vectors

This is a discussion on Axis based on 2 Vectors within the Game Programming forums, part of the General Programming Boards category; I'm a little hazy when it comes to vectors, maybe some of you can shed some light on me. I'm ...

  1. #1
    Bioport Productions
    Join Date
    Oct 2005
    Posts
    215

    Axis based on 2 Vectors

    I'm a little hazy when it comes to vectors, maybe some of you can shed some light on me. I'm trying to generate an axis based on 2 3D vectors. What I mean is, I want +Z to go down the vector +X to go to the right of it, etc. This is what I have so far:

    Code:
    Vec3 Start, End, Final;
    
    Final = End - Start / |End - Start|; // Gives me the vector from Start->End
    And that about sums it up lol. I was thinking maybe a couple cross products could give me the data to work with, but I really don't know. If I can't get an axis to work with, what would I need to do to get a point to the right of the vector? Maybe this?

    Code:
    Final.x += 2.0f; //?
    Anyone have a clue to what I'm talking about?
    -"What we wish, we readily believe, and what we ourselves think, we imagine others think also."
    PHP Code:
    sadf 

  2. #2
    Bioport Productions
    Join Date
    Oct 2005
    Posts
    215
    Figured it out...
    -"What we wish, we readily believe, and what we ourselves think, we imagine others think also."
    PHP Code:
    sadf 

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Vectors
    By naseerhaider in forum C++ Programming
    Replies: 11
    Last Post: 05-09-2008, 09:21 AM
  2. How can i made vectors measuring program in DevC++
    By flame82 in forum C Programming
    Replies: 1
    Last Post: 05-07-2008, 03:05 PM
  3. How properly get data out of vectors of templates?
    By 6tr6tr in forum C++ Programming
    Replies: 4
    Last Post: 04-15-2008, 11:35 AM
  4. why page based I/O can improve performance?
    By George2 in forum C Programming
    Replies: 1
    Last Post: 06-12-2006, 08:42 AM
  5. AXIS and C++
    By bman1176 in forum C++ Programming
    Replies: 0
    Last Post: 03-29-2006, 11:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21