Ray Collider
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/04/2010 at 00:19, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10
Platform: Windows ;
Language(s) : C++ ;---------
Hi,first of all, im kind of new in programming plugins in Cinema4D. But i have a question, where i cant find anything related to in the internet.
Im using the GeRayCollider to get to know if a certain area is illuminated by a source of light (sun). If the plugin emits a ray from a specific point there are at least four intersections found, although there should be only one. The first three intersections are the startingpoint of the ray. Faces, which are hit by the ray, are sometimes counted twice. I havn't foundd any solution yet.
If someone knows why this happen, it would be very nice to give me a hand.
Cheers
Falk -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/04/2010 at 02:52, xxxxxxxx wrote:
Please post some example code and maybe test scenes showing the problem.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/06/2010 at 07:26, xxxxxxxx wrote:
Hi,
i found a solution to my problem posted above. Right now i have another one, related to the first one.
I still want to know if a point is shadowed by another object. There are now problems with the object MoonTerrain. But whenever the plugin checks MoonTerrain, there is no intersection found, although there should be.
Here is an abstract of my code
Bool shadow = ray->Init(MoonTerrain); //MoonTerrain is a polygonised BaseObject shadow = ray->Intersect(c,Sun,Sun_Laenge,FALSE); -> shadow is always FALSE, i believe here is the major problem, but i dont know how to fix it :( //c = position of ray origin //Sun = direction //Sun_Laenge = length of ray if (shadow) { long hits = ray->GetIntersectionCount(); //... do something more, but shadow is always FALSE } //checks if moon station shades itselfs shadow = ray->Init(MoonStation); shadow = ray->Intersect(c,Sun,Sun_Laenge,FALSE); if(shadow) { long hits = ray->GetIntersectionCount(); // true -> here i dont have any problems ... }
I hope, that someone understood the problem. Thanks for your help
[EDIT]: Ups, my ray lenght was zero, i checked everything, except this one.
Cheers
Falk