Results 1 to 3 of 3

Thread: How is a box defined??

  1. #1

    How is a box defined??

    Hi

    I have a small question:

    I know that the definition for a sphere is this:

    x,y,z,radius

    Now i like to know the common definition of a box.
    I mean a box with any size, at any positon with any rotation/orientation (so i'm not talking about an Axis-aligned box).
    I want to use as less variabeles as possible.

    Does someone know this definition

    Thank you!
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  2. #2
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    How is a box defined??

    I'm assuming that you are having it originate from the center like the sphere, so it would be something like...

    this?

    x, y, z, width, height, length, xrot, yrot, zrot

    I think thats a low as you can get it.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #3

    How is a box defined??

    Ok?© thank you...

    I didn't know what the best definition was, i was struggling a bit with the rotations and how to get them as compact as possible.

    EDIT: haha nice... i'm an octal champion now :lol:
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Bookmarks

Posting Permissions

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