コード例 #1
0
void Manipulator::UpdateDiagnostics(const MeshPtr selectedMesh)
{
    const float length = 5.0f;
    const auto position = selectedMesh->Position();

    m_engine->diagnostic()->UpdateText(Diagnostic::MESH, "SelectedTool", 
        Diagnostic::WHITE, GetDescription(m_selectedTool));

    m_engine->diagnostic()->UpdateText(Diagnostic::MESH, "SelectedAxis", 
        Diagnostic::WHITE, GetDescription(m_selectedAxis));

    m_engine->diagnostic()->UpdateText(Diagnostic::MESH, "AnimationPoints",
        Diagnostic::WHITE, StringCast(selectedMesh->GetAnimationPoints().size()));

    m_engine->diagnostic()->UpdateLine(Diagnostic::MESH, "MeshXaxis", 
        Diagnostic::YELLOW, position, position + (selectedMesh->Right() * length));

    m_engine->diagnostic()->UpdateLine(Diagnostic::MESH, "MeshYaxis", 
        Diagnostic::RED, position, position + (selectedMesh->Up() * length));

    m_engine->diagnostic()->UpdateLine(Diagnostic::MESH, "MeshZaxis", 
        Diagnostic::GREEN, position, position + (selectedMesh->Forward() * length));
}