I have to learn everything about classes and inheriting..
now I've written a little program on my own (similiar to the example on the processing site), but I don't understand whether this is all you can do with this "extends"?
I've got an equation that allows to calculate the coordinates of a point if it was rotated around an axis that is given in a space with three angles.. But now, how can I calculate these angles?
if I've got a vector.. can I do this with the tan() or how is that possible?
I've got a textfield (programmed on my own) where I want users to give in some text. If this text is typed in, it should be shown there but still be changeable.
in the textfield class I work with separate characters. When a key is pressed, a new character is added. If the submit-button is pressed, I join these characters to one and give it out. So far no problems..
I use the textfield to add new objects for example a point or a triangle. for all the points there are the same two textfields (one for the name, the other for the coordinates--> the coordinates I split by "," and there's no problem).
If the text has been submitted, a new object is added and the text is deleted because the textfield is like I said used for all the other objects as well.
But if I select an object, I'd like the coordinates and the name to be shown.. It isn't stored in the textfield (that's because the values are changeable without typing a number but with dragging it around on the screen). So there has the actual value to be written there, a float or a string value. No problem so far, but hence it should be changeable it has to be splitted by every character. But if I split a string by:
String split1[]=(myString,"");
the program crashes ;)
any ideas how to split a string (or a float) by every character??
I'm programming a little 3d-software and have got lines there. I want them to be shown as long as the points are in a "virtual" box. So I can find the intersection points of the line and this box. (6 planes) this is no problem and I can display these points. But there's the problem that the lines have more than two intersection points, so you can't say which are the "true" ones. I 'm looking for these points that really are intersection points of this box and not with the whole plane..
so is there an easy idea? I solved the problem of finding the points (easily) with the coordinate equation but now I'm stuck..
could anyone tell me why this isn't working? it's just displaying a half circle.
it's not the whole code (and exactly the right code, but it should be still somehow the same) because this would be too long. Hope you can help me anyway...
int m1=20, m2=20; // number of steps float t=PI/m1; // angle 1 float t2=2*PI/m2; // angle 2 float x,y,z;
is there an easy possibility to load and save files? I talk about searching the file in the folders, is there an easier way than tipping the whole link to the file? (like a file browser?)