Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

計算量削減 #45

Closed
1 of 3 tasks
mitsuyoshi-yamazaki opened this issue Apr 18, 2021 · 1 comment
Closed
1 of 3 tasks

計算量削減 #45

mitsuyoshi-yamazaki opened this issue Apr 18, 2021 · 1 comment
Labels
TODO 技術課題/実装要件

Comments

@mitsuyoshi-yamazaki
Copy link
Owner

mitsuyoshi-yamazaki commented Apr 18, 2021

  • 四分木を使ってLineが自身の収まる最小の矩形とその近辺のLineとの衝突判定のみを行うようにする
  • ふたつのオブジェクトの衝突判定を行う際に、階層の深い QuadtreeNode から .collisionCheckObjects() を参照した方がオブジェクト数が減る
    • 理屈は正しいが今回は1対多で衝突判定を行うため意味がない
  • root nodeの外へ向かう枝がroot node参照になってしまうので、適切なoffspring nodeに割り振るようにすれば計算量が減る
    • root nodeの領域外へ向かう枝は死ぬので無条件で排除(collision=true)して良い
@mitsuyoshi-yamazaki mitsuyoshi-yamazaki added the TODO 技術課題/実装要件 label Apr 28, 2021
@mitsuyoshi-yamazaki
Copy link
Owner Author

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TODO 技術課題/実装要件
Projects
None yet
Development

No branches or pull requests

1 participant