Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
2D Vector Class
Author Message
Catalyst

Posted: Thu May 08, 2003 10:33 pm   Post subject: 2D Vector Class

pretty basic but good for 2d movement

VectorClass.t
Description:
Filename:  VectorClass.t
Filesize:  923 Bytes

Homer_simpson

Posted: Thu May 08, 2003 10:56 pm   Post subject: (No subject)

it looks like a good class , but i've got a few problems... :
First of all i dunno what a vector is?
then i dunno what the function normalize and setangle do?

HELP!!!
Catalyst

Posted: Thu May 08, 2003 11:04 pm   Post subject: (No subject)

a vector can be thought of in this case as an objects x and y speeds and thus its direction

seting the angle change the speed so that the object would go in the direction of the angle

normalizing reduce the vector down to a size of 1 (still move in the same direction. except slower
Homer_simpson

Posted: Thu May 08, 2003 11:06 pm   Post subject: (No subject)

aaaaaaah... i c
i've done that in a different method i used boards friction to reduce the speed of ball but i still think yer method is better =/
Homer_simpson

Posted: Thu May 08, 2003 11:11 pm   Post subject: (No subject)

ok now i understand but which one of the procedures in the class actually moves the vector?
Catalyst

Posted: Fri May 09, 2003 6:14 am   Post subject: (No subject)

you dont move the vector, its used to move another object
Homer_simpson

Posted: Fri May 09, 2003 11:55 am   Post subject: (No subject)

oh ic now i know what it exactly is ...
nate

Posted: Fri May 09, 2003 4:34 pm   Post subject: ????

What are you sapposed to do with the code u posted. I am not really fimiliar with class. Is there some code 2 input to make the file do something?

-Nate

Tony

Posted: Fri May 09, 2003 4:39 pm   Post subject: (No subject)

i think there's a tutorial around here on how to use classes... its that thing where you go ClassName -> procedure
Tony's programming blog. DWITE - a programming contest.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 9 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: