GithubHelp home page GithubHelp logo

Comments (9)

zhtdavis avatar zhtdavis commented on August 22, 2024

How long does it take for you to do brute force intersection test? Mine is around 7s. On the readme it seems the demo program is using the second algorithm which is much faster.

from computer-graphics-bounding-volume-hierarchy.

zhtdavis avatar zhtdavis commented on August 22, 2024

Mine is like:

Method Time in seconds
brute force 7.68331193924
build trees 0.01909399033
use trees 0.00568318367

from computer-graphics-bounding-volume-hierarchy.

velociraptor111 avatar velociraptor111 commented on August 22, 2024

yeah, mine takes a long time as well like ~11 seconds.
Did you use algorithm 1 as well?

from computer-graphics-bounding-volume-hierarchy.

zhtdavis avatar zhtdavis commented on August 22, 2024

Yes.

from computer-graphics-bounding-volume-hierarchy.

velociraptor111 avatar velociraptor111 commented on August 22, 2024

Just to verify if I'm doing this correctly, you check for these conditions:

  1. If two edges from triangle A intersect triangle B && 0 edges from triangle B intersect triangle A return true
  2. If two edges from triangle B intersect triangle A && 2 edges from triangle A intersect triangle B
    return true
  3. If 1 edge from triangle A intersect triangle B && 1 edge from triangle B intersect triangle A
    return true

else return false

is that all?

from computer-graphics-bounding-volume-hierarchy.

zhtdavis avatar zhtdavis commented on August 22, 2024

I'm doing six ray-triangle intersection queries. Not sure this is the correct way to do it...

from computer-graphics-bounding-volume-hierarchy.

velociraptor111 avatar velociraptor111 commented on August 22, 2024

Yeah same, so I converted each edge basically into a ray and use the function from "ray_intersect_triangle.h" to intersect the with "ray" with the triangle. Ray origin if one of the vertex (call this A) and the direction is going from this ray to the next vertex B. (hence direction is B-A)

If ray intersects the triangle then it means that edge intersects the triangle.

not sure either lol

from computer-graphics-bounding-volume-hierarchy.

krsh732 avatar krsh732 commented on August 22, 2024

So do we need to worry about coplanar triangles?

from computer-graphics-bounding-volume-hierarchy.

velociraptor111 avatar velociraptor111 commented on August 22, 2024

I got the correct results .. So I think yes ..(?) also the chances of triangles exactly being coplanar are pretty slim ...

from computer-graphics-bounding-volume-hierarchy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.