Results 1 to 3 of 3

Thread: LookVector from ViewMatrix?

  1. #1

    Thread Starter
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339

    LookVector from ViewMatrix?

    // get the look vector of the camera from the view matrix
    Vector3f vLookVector;
    m_mxView.LookVector(&vLookVector);

    // calculate the center of the sphere
    m_frusSphere.Center() = m_vCameraPosition + (vLookVector * (fViewLen * 0.5f) + m_fNearPlane);


    I do not understand what this piece of code is looking for.
    What exactly would a look vector be?

    Would it be the position of the Player minus the position of the Camera
    vPlayerPos - vCameraEye = vForward
    "From what was there, and was meant to be, but not of that was faded away." - - Steve Damm

    "The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm

    "When you do things right, people won't be sure if you did anything at all." - - God from Futurama

  2. #2
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: LookVector from ViewMatrix?

    I guess it would be a unit vector (length 1) in the direction that the player/camera was looking.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  3. #3

    Thread Starter
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339

    Re: LookVector from ViewMatrix?

    Thats what I figured.

    I am just getting some bogus sphere to sphere collision results.
    and I believe it has to do with the frustum sphere I am drawing.

    My old quadtree node sphere to each of the 6 frustrum plane test worked out great.
    Now using the same sphere's and pressing each sphere against the frustum sphere...a ton less tests...but at certain angles the terrain just gets completly culled.

    why?
    "From what was there, and was meant to be, but not of that was faded away." - - Steve Damm

    "The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm

    "When you do things right, people won't be sure if you did anything at all." - - God from Futurama

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width