Thread: Axis based on 2 Vectors

  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, 08: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, 02: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, 10:35 AM
  4. why page based I/O can improve performance?
    By George2 in forum C Programming
    Replies: 1
    Last Post: 06-12-2006, 07:42 AM
  5. AXIS and C++
    By bman1176 in forum C++ Programming
    Replies: 0
    Last Post: 03-29-2006, 11:00 AM