Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Vector
- {
- float *dim;
- Vector ()
- {
- dim = new float [3];
- }
- };
- struct Face
- {
- float an_N, an_P;
- int P, N;
- Vector Af;
- float Ad;
- Vector cnt;
- float ifac;
- float mf;
- };
- std::vector <Face> face;
- Face temp_face;
- for (;;)
- {
- temp_face.cnt.dim[0] = 0.f;
- temp_face.cnt.dim[1] = 0.f;
- temp_face.cnt.dim[2] = 0.f;
- for (int q=0; q<n_vtx_2D; ++q)
- {
- temp_face.cnt = temp_face.cnt + pt[vtx[q]] / n_vtx_2D;
- }
- face.push_back(temp_face);
- }
- std::cout << face[0].cnt.dim[0] << std::endl;
- struct Vector
- {
- float dim[3];
- };
Add Comment
Please, Sign In to add comment