diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/render/mesh_volume.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/intern/cycles/render/mesh_volume.cpp b/intern/cycles/render/mesh_volume.cpp index f2347c79610..3571beb40d6 100644 --- a/intern/cycles/render/mesh_volume.cpp +++ b/intern/cycles/render/mesh_volume.cpp @@ -152,22 +152,22 @@ public: void add_node_with_padding(int x, int y, int z); void create_mesh(vector<float3> &vertices, - vector<int> &indices, - vector<float3> &face_normals); + vector<int> &indices, + vector<float3> &face_normals); private: void generate_vertices_and_quads(vector<int3> &vertices_is, - vector<QuadData> &quads); + vector<QuadData> &quads); void deduplicate_vertices(vector<int3> &vertices, - vector<QuadData> &quads); + vector<QuadData> &quads); void convert_object_space(const vector<int3> &vertices, - vector<float3> &out_vertices); + vector<float3> &out_vertices); void convert_quads_to_tris(const vector<QuadData> &quads, - vector<int> &tris, - vector<float3> &face_normals); + vector<int> &tris, + vector<float3> &face_normals); }; VolumeMeshBuilder::VolumeMeshBuilder(VolumeParams *volume_params) @@ -224,8 +224,8 @@ void VolumeMeshBuilder::add_node_with_padding(int x, int y, int z) } void VolumeMeshBuilder::create_mesh(vector<float3> &vertices, - vector<int> &indices, - vector<float3> &face_normals) + vector<int> &indices, + vector<float3> &face_normals) { /* We create vertices in index space (is), and only convert them to object * space when done. */ @@ -260,8 +260,8 @@ void VolumeMeshBuilder::generate_vertices_and_quads( /* Compute min and max coords of the node in index space. */ int3 min = make_int3((x - pad_offset.x)*CUBE_SIZE, - (y - pad_offset.y)*CUBE_SIZE, - (z - pad_offset.z)*CUBE_SIZE); + (y - pad_offset.y)*CUBE_SIZE, + (z - pad_offset.z)*CUBE_SIZE); /* Maximum is just CUBE_SIZE voxels away from minimum on each axis. */ int3 max = make_int3(min.x + CUBE_SIZE, min.y + CUBE_SIZE, min.z + CUBE_SIZE); @@ -316,7 +316,7 @@ void VolumeMeshBuilder::generate_vertices_and_quads( } void VolumeMeshBuilder::deduplicate_vertices(vector<int3> &vertices, - vector<QuadData> &quads) + vector<QuadData> &quads) { vector<int3> sorted_vertices = vertices; std::sort(sorted_vertices.begin(), sorted_vertices.end()); @@ -355,7 +355,7 @@ void VolumeMeshBuilder::deduplicate_vertices(vector<int3> &vertices, } void VolumeMeshBuilder::convert_object_space(const vector<int3> &vertices, - vector<float3> &out_vertices) + vector<float3> &out_vertices) { out_vertices.reserve(vertices.size()); @@ -369,8 +369,8 @@ void VolumeMeshBuilder::convert_object_space(const vector<int3> &vertices, } void VolumeMeshBuilder::convert_quads_to_tris(const vector<QuadData> &quads, - vector<int> &tris, - vector<float3> &face_normals) + vector<int> &tris, + vector<float3> &face_normals) { int index_offset = 0; tris.resize(quads.size()*6); @@ -399,8 +399,8 @@ struct VoxelAttributeGrid { }; void MeshManager::create_volume_mesh(Scene *scene, - Mesh *mesh, - Progress& progress) + Mesh *mesh, + Progress& progress) { string msg = string_printf("Computing Volume Mesh %s", mesh->name.c_str()); progress.set_status("Updating Mesh", msg); @@ -470,8 +470,8 @@ void MeshManager::create_volume_mesh(Scene *scene, const int3 resolution = volume_params.resolution; float3 start_point = make_float3(0.0f, 0.0f, 0.0f); float3 cell_size = make_float3(1.0f/resolution.x, - 1.0f/resolution.y, - 1.0f/resolution.z); + 1.0f/resolution.y, + 1.0f/resolution.z); if(attr) { const Transform *tfm = attr->data_transform(); @@ -575,12 +575,12 @@ void MeshManager::create_volume_mesh(Scene *scene, /* Print stats. */ VLOG(1) << "Memory usage volume mesh: " - << ((vertices.size() + face_normals.size())*sizeof(float3) + indices.size()*sizeof(int))/(1024.0*1024.0) - << "Mb."; + << ((vertices.size() + face_normals.size())*sizeof(float3) + indices.size()*sizeof(int))/(1024.0*1024.0) + << "Mb."; VLOG(1) << "Memory usage volume grid: " - << (resolution.x*resolution.y*resolution.z*sizeof(float))/(1024.0*1024.0) - << "Mb."; + << (resolution.x*resolution.y*resolution.z*sizeof(float))/(1024.0*1024.0) + << "Mb."; } CCL_NAMESPACE_END |