View Single Post
# 7 11-02-2006 , 07:50 PM
MattTheMan's Avatar
Registered User
Join Date: Apr 2005
Location: Fairfield, CT
Posts: 2,436
Alright, now everything, instead of working with a ton of floats, works with the typedef class

vector3d{
public: float x, float y, float z
};

And all of the funcs, instead of taking (example)

DOT(float ax, float ay, float az, float bx, float by, float bz)

it takes

DOT(vector3d V, vector3d, U).

This is a whole lot faster on me, like when I have the following function

RectAndL-Intersect(float ax, float ay, float az, float bx, float by, float bz, float cx, float cy, float cz, float dx, float dy, float dz, float testx, float testy, float testz)

Which took 15 float values. Instead, now it works like:

RectAndL-Intersect(point A, point B, point C, point D, point Test)

Still takes 15 float values, but they are stored inside 5 point values. Point values have

typdef class point{
public: float x, y, z;
};

Next up: Point-Plane tests, followed by Ray-Plane intersection tests, my first intersection tests!

Cya Later Peeps,
Matt user added image
Update soon.


Live the life you love, love the life you live