void RadialTreeLayout::call(GraphAttributes &AG) { const Graph &tree = AG.constGraph(); if(tree.numberOfNodes() == 0) return; if (!isArborescence(tree)) OGDF_THROW_PARAM(PreconditionViolatedException, pvcForest); OGDF_ASSERT(m_levelDistance > 0); // determine root of tree (m_root) FindRoot(tree); // compute m_level[v], m_parent[v], m_leaves[v], m_numLevels ComputeLevels(tree); // computes diameter of each node ComputeDiameters(AG); // computes m_angle[v] and m_wedge[v] ComputeAngles(tree); // computes final coordinates of nodes ComputeCoordinates(AG); }
void CameraFPS::FrameStarted(double delta) { const float factor = (delta * m_factor_move); // Motion if (m_left_press) m_Position += m_left * factor; if (m_right_press) m_Position += -m_left * factor; if (m_up_press) m_Position += m_forward * factor; if (m_down_press) m_Position -= m_forward * factor; ComputeAngles(); CameraAbstract::ComputeMatrix(); }