40 lines
844 B
C
40 lines
844 B
C
|
|
#include <iostream>
|
||
|
|
//using namespace std;
|
||
|
|
struct vec3_parent {
|
||
|
|
virtual int norm(int x1, int& x2) {
|
||
|
|
x2 = x1 * x2;
|
||
|
|
return x2;
|
||
|
|
//cout << x2 << "vec3_parent::norm" << endl;
|
||
|
|
}
|
||
|
|
};
|
||
|
|
struct vec3 : public vec3_parent {
|
||
|
|
__cppast(id = 1)
|
||
|
|
__cppast(name = "x")
|
||
|
|
__cppast(desc = "???")
|
||
|
|
float x = 1;
|
||
|
|
float y = 2;
|
||
|
|
float z = 3;
|
||
|
|
//string name{ "hellohellohellohellohellohello" };
|
||
|
|
int norm(int x1, int& x2)override {
|
||
|
|
int tmp = x1 * 2 + 1;
|
||
|
|
x1 = x2;
|
||
|
|
x2 = tmp;
|
||
|
|
return x2;
|
||
|
|
//cout << x2 << "vec3::norm" << endl;
|
||
|
|
}
|
||
|
|
virtual float norm1(int& x1) {
|
||
|
|
x1 = x1 * x * y * z;
|
||
|
|
//x = x1;
|
||
|
|
//y = x1 - 1;
|
||
|
|
//z = x1 - 10;
|
||
|
|
//cout << x1 << "::norm1" << endl;
|
||
|
|
return x1;
|
||
|
|
}
|
||
|
|
static void norm2(int x1 = 10) {
|
||
|
|
//cout << x1 << "::norm2" << endl;
|
||
|
|
}
|
||
|
|
static void norm3(int x1 = 10) {
|
||
|
|
x1 = x1 * 10;
|
||
|
|
//cout << x1 << "::norm3" << endl;
|
||
|
|
}
|
||
|
|
};
|