Sie sind nicht angemeldet.
Lieber Besucher, herzlich willkommen bei: Aqua Computer Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.
LiquidAcid
unregistriert
crushcoder
God
Gott hat die Welt ja nur in sieben Tagen erschaffen können, weil es keine installierte Basis gab.
Zitat von »r1ppch3n@2100+«
der unterschied is eigentlich ned groß :
programmiersprache is programmiersprache, bis auf ne etwas andre syntax (die man eigentlich schnell drauf ham sollte) san die sich alle ziemlich ähnlich![]()
![]() |
Quellcode |
1 2 3 4 |
for i := 0 to 10 do begin a := a + 1; end; |
![]() |
Quellcode |
1 2 3 |
for(i=0;i<=10;i++){ a++; }; |
LiquidAcid
unregistriert
LiquidAcid
unregistriert
![]() |
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
#ifndef _BASIC_VECTOR_H_ #define _BASIC_VECTOR_H_ #include <GL/gl.h> // The OpenGL Header #include <GL/glu.h> // And The GLu Heander class basic_vector { public: // constructors basic_vector(); basic_vector(basic_vector* vec); basic_vector(const GLfloat& x, const GLfloat& y, const GLfloat& z); basic_vector(const GLfloat* array_ptr); basic_vector(GLfloat* array_ptr); ~basic_vector(); // destructor basic_vector(const basic_vector& rhs); // copy-contructor // operators basic_vector& operator=(const basic_vector& rhs); basic_vector operator+(const basic_vector& rhs) const; const basic_vector& operator+=(const basic_vector& rhs); basic_vector operator-(const basic_vector& rhs) const; const basic_vector& operator-=(const basic_vector& rhs); basic_vector operator*(const GLfloat& scalar) const; const basic_vector& operator*=(const GLfloat& scalar); basic_vector operator/(const GLfloat& scalar) const; const basic_vector& operator/=(const GLfloat& scalar); GLfloat length() const; // normalizer methods const basic_vector& normalize(); basic_vector getNormalized() const; // inverter methods const basic_vector& invert(); basic_vector getInverted() const; // set methods void set(const GLfloat& x, const GLfloat& y, const GLfloat& z); void setX(const GLfloat& x) {xyz[0] = x;} void setY(const GLfloat& y) {xyz[1] = y;} void setZ(const GLfloat& z) {xyz[2] = z;} // get methods const GLfloat* get() const {return xyz;} const GLfloat& getX() const {return xyz[0];} const GLfloat& getY() const {return xyz[1];} const GLfloat& getZ() const {return xyz[2];} GLfloat* getXp() {return &xyz[0];} GLfloat* getYp() {return &xyz[1];} GLfloat* getZp() {return &xyz[2];} GLfloat dot(basic_vector& rhs) const; GLfloat angle(basic_vector& rhs) const; basic_vector cross(basic_vector& rhs) const; void interpolate(const basic_vector& v) const; void interpolate(const basic_vector& v, const GLfloat& step); basic_vector getInterpolation(const basic_vector& v) const; basic_vector getInterpolation(const basic_vector& v, const GLfloat& step) const; void ex() {glVertex3fv(this->xyz);} private: GLfloat* xyz; }; #endif |
crushcoder
God
Gott hat die Welt ja nur in sieben Tagen erschaffen können, weil es keine installierte Basis gab.
Daywalker313
Senior Member
Zitat von »LiquidAcid«
Ich finde sowas schön:
![]()
Quellcode
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 #ifndef _BASIC_VECTOR_H_ #define _BASIC_VECTOR_H_ #include <GL/gl.h> // The OpenGL Header #include <GL/glu.h> // And The GLu Heander class basic_vector { public: // constructors basic_vector(); basic_vector(basic_vector* vec); basic_vector(const GLfloat& x, const GLfloat& y, const GLfloat& z); basic_vector(const GLfloat* array_ptr); basic_vector(GLfloat* array_ptr); ~basic_vector(); // destructor basic_vector(const basic_vector& rhs); // copy-contructor // operators basic_vector& operator=(const basic_vector& rhs); basic_vector operator+(const basic_vector& rhs) const; const basic_vector& operator+=(const basic_vector& rhs); basic_vector operator-(const basic_vector& rhs) const; const basic_vector& operator-=(const basic_vector& rhs); basic_vector operator*(const GLfloat& scalar) const; const basic_vector& operator*=(const GLfloat& scalar); basic_vector operator/(const GLfloat& scalar) const; const basic_vector& operator/=(const GLfloat& scalar); GLfloat length() const; // normalizer methods const basic_vector& normalize(); basic_vector getNormalized() const; // inverter methods const basic_vector& invert(); basic_vector getInverted() const; // set methods void set(const GLfloat& x, const GLfloat& y, const GLfloat& z); void setX(const GLfloat& x) {xyz[0] = x;} void setY(const GLfloat& y) {xyz[1] = y;} void setZ(const GLfloat& z) {xyz[2] = z;} // get methods const GLfloat* get() const {return xyz;} const GLfloat& getX() const {return xyz[0];} const GLfloat& getY() const {return xyz[1];} const GLfloat& getZ() const {return xyz[2];} GLfloat* getXp() {return &xyz[0];} GLfloat* getYp() {return &xyz[1];} GLfloat* getZp() {return &xyz[2];} GLfloat dot(basic_vector& rhs) const; GLfloat angle(basic_vector& rhs) const; basic_vector cross(basic_vector& rhs) const; void interpolate(const basic_vector& v) const; void interpolate(const basic_vector& v, const GLfloat& step); basic_vector getInterpolation(const basic_vector& v) const; basic_vector getInterpolation(const basic_vector& v, const GLfloat& step) const; void ex() {glVertex3fv(this->xyz);} private: GLfloat* xyz; }; #endif
Da habe ich auch keine Probleme mich reinzudenken![]()
-