SHARE
TWEET

Untitled

a guest May 26th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (ins->base_type == VS::INSTANCE_MESH)
  2.         {
  3.             int sur_count = VSG::storage->mesh_get_surface_count(ins->base);
  4.             for (int c = 0; c < sur_count; c++)
  5.             {
  6.                 VisualServer *vs = VisualServer::get_singleton();
  7.                 Array vertex_array = vs->mesh_surface_get_arrays(ins->base, c);
  8.                 //Variant vertex_variant = vertex_array[VisualServer::ARRAY_VERTEX];
  9.                 PoolVector<Vector3> v3_pool = vertex_array[VisualServer::ARRAY_VERTEX];
  10.                 printf("ArrayMesh Size: %d ", vertex_array.size());
  11.                 printf("Vertex Size: %d\n", v3_pool.size()/3);
  12.                 for (int v = 0; v < v3_pool.size() / 3; v++)
  13.                 {
  14.                     printf("V%d: X->%.3f, Y->%.3f, Z->%.3f\n\n", v, v3_pool.get(v).x, v3_pool.get(v).y, v3_pool.get(v).z);
  15.                 }
  16.             }
  17.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top