Skip to content

Commit

Permalink
Set direction to the top neighbor as random one
Browse files Browse the repository at this point in the history
  • Loading branch information
tanya-kta committed Oct 31, 2020
1 parent ea5956f commit d5411a5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/simulation_objects/SimulationMap.cu
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ __device__ SimulationMap::SimulationMap(Polyhedron *polyhedron) :
nodes[0] = MapNode(polyhedron, start_face, start_node_coordinates);
n_of_nodes = 1;

// Direction vector parallel to the vertical edges of cube
SpacePoint direction_vector = {0, 0, 1};
// Direction vector of the first node to the top neighbor
SpacePoint direction_vector = relative_point_rotation(start_node_coordinates, start_face->get_vertices()[0],
start_face->get_normal(), M_PI * 2 * rand0to1()) -
start_node_coordinates;

/**
* Array of direction vectors from nodes with the same index
* as in `SimulationMap::nodes` array to their top neighbors
Expand Down

0 comments on commit d5411a5

Please sign in to comment.