-
Notifications
You must be signed in to change notification settings - Fork 5
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
Update #1
Comments
Hi,Sir.@amirgeva I'm learning about ColDet.But I find nothing tutorials about it.Do you have some examples codes?Thank you very much! |
Hi @Luxcy you can first have a look at the HTML doc for Create a model, then add the triangles of your mesh with Claudette::CollisionModel3D model;
foreach triangle in mesh {
model.addTriangle(...);
}
model.finalize();
Claudette::RayCollisionTest rayTest;
rayTest.setRayOrigin(...);
rayTest.setRayDirection(...);
rayTest.setRaySearch(RayCollisionTest::SearchClosestTriangle);
if (model.rayCollision(&rayTest)) { // Ray-Model collision ?
const float* pntCollision = rayTest.point();
// ...
} Notice that you can run many concurrent collision tests on the same model. This is an enhancement allowed by Claudette but not by ColDet. |
@HuguesDelorme Thank you very much! |
Hello @Luxcy I don't clearly understand your intent. You said you are doing ray collision from a mesh point to the camera but obviously this won't collide right ? How could such ray intersects ? |
Thank you for your reply. @HuguesDelorme |
But your camera isn't a physical object right ? If so then how could your ray test collide with it ? |
Yes, my camera isn't a physical object. |
@Luxcy |
Sorry,I forget to say my goal. |
You should check a ray from the camera in the direction of the point.
Then, check the distance between the first intersection and the point. If
it's larger than a small value (depending on model, e.g. 0.001) then the
point is occluded.
…On Thu, Mar 28, 2019 at 3:59 AM Luxcy ***@***.***> wrote:
Sorry,I forget to say my goal.
I want to use collision to know whether the test point is visible at a
specific angle of view.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADvRRbZXjWr9QQbKBsW92lPNMqIZhYgaks5vbCIWgaJpZM4DeSU1>
.
|
Yes,I do like you said. |
Hi. I'm the original author of ColDet.
Just a couple of updates: The original email address as shown in your main README has been inactive for years. You can contact me here on Github, if need be.
Also, although the library has not had an update for a very long time, it did get a version 2 back in 2013 that included multi-object systems (http://sourceforge.net/projects/coldet/)
I would suggest that you merge those updates, if you want to avoid too much of divergence.
The text was updated successfully, but these errors were encountered: