THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/05/2004 at 09:14, xxxxxxxx wrote:
Cinema 4D Version: 8.100
Platform: Windows ;
Language(s) : C++ ;
---------Does the RayCollider engine work with splines too?
On 30/05/2004 at 17:17, xxxxxxxx wrote:
I assume it doesn't, since you're asking the question...
But since all its data comes from the GeColliderCache, where it has to be inserted as triangles, I don't see how it could do anything sensible with splines.
PS. Please remember to type in the right version when posting. (I'm assuming you don't use 8.100 anymore.)
On 30/05/2004 at 19:22, xxxxxxxx wrote:
hehe, yes I tried it but it doesn´t seem to work. But actually I think it should (be extended to) do so, for a ray can also collide with a line object. Well, ok, then I need to use my own functions.
PS.: Yes you are right. But it´s a pain that not the latest version is standing there by default (especially because developers should "...use the latest version of CINEMA 4D..." as stated in the SDK reference
On 31/05/2004 at 04:50, xxxxxxxx wrote:
ray collision with 1D objects doesn't make much sense, just because an intersection between two 1D objects is extremely unlikely in 3D space. In normal case you have to add some tolerance (consider numerical inaccuracy!) for example by converting your ray into a cylinder. And then you don't have a ray-line collision anymore, but a surface-line collision.
On 31/05/2004 at 06:46, xxxxxxxx wrote:
actually the line object is expressed in 3D (as the ray is) so it should work without problems. Intersections between generic lines in 3D are of course statistically almost impossible. Lines are infinitely thin, so the chance they'd ever intersect each other is pretty much negligible. But this isn´t the case here afa i can see.
On 31/05/2004 at 08:13, xxxxxxxx wrote:
There are several 3D line to line intersection algorithms.
The Geometry Archive, MathWorld, etc...
Or pick up copies of the Graphic Gems series.
On 31/05/2004 at 08:41, xxxxxxxx wrote:
If you are absolutely sure that a ray intersects the spline, I would bet, that both spline and ray lie in one plane. In that case you can reduce the intersection complexitiy to 2D. See Darf's great link.
The 3D line-line "intersection" method of that link was new to me and is fantastic. Thanks
On 31/05/2004 at 09:01, xxxxxxxx wrote:
thanks guys, but I already had a 3d line line intersection algorithm before. I wanted to use the raycollider engine because I thought it might help me out with other issues than the intersection itself.
All Graphic Gems and Bourke´s algos are of course long time known
On 31/05/2004 at 09:03, xxxxxxxx wrote:
P.S.: your bet is false, they do not lie in one plane. But spatial subdivision eases the detection of ray line intersections tremendously.
On 31/05/2004 at 09:10, xxxxxxxx wrote:
I know - I didn't say, that you should run through all lines
I wrote a kd-tree class and developed it further to what i call "kdo-tree". If you are interested in it, feel free to contact me, perhaps I can help you.
On 31/05/2004 at 09:17, xxxxxxxx wrote:
K(u)do(s) thanks for the offer. I might come back to it at a later time. But currently I am using an Octree. This works already fine but Shaders are just....well, not my thing, so it might be possible.