THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/10/2005 at 16:20, xxxxxxxx wrote:
Cinema 4D Version: 9.1
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
i read in the forum that all geometry are triangulate before before rendering.
I need to know the vertex coordinate of a polygon hit by ray inside a SimpleIllumModel take from Sdk.
i noticed that
LONG polyid = 0;
RayObject *myop = vd->ID_to_Obj(vd->lhit, &polyid;);
polyid is the # of triangle in the scene.. i tried tihs.
and i see the RayPolygon have a,b,c and d...
Why d? Does the Raypolygon are not all triangle?
How i can get the real the vertex in global coordinate of my polygon?
Sorry for bad english in the question.
Thanks in advance
On 26/10/2005 at 17:32, xxxxxxxx wrote:
I got the correct vertex:
LONG polyid = 0;
RayObject *myop = sd->ID_to_Obj(sd->lhit, &polyid;);
RayPolygon *vadr = myop->vadr;
Vector *padr = myop->padr;
a = vadr[polyid].a;
b = vadr[polyid].b;
c = vadr[polyid].c;
My question is:
is guaranted that "a" for rayobject is the same "a" of Polyobject?
On 27/10/2005 at 06:46, xxxxxxxx wrote:
plugincafe' is closed?
On 27/10/2005 at 08:21, xxxxxxxx wrote:
No, it's not closed. Relevant passage from the docs: "Depending on the nature of your query, an answer can be made quickly or perhaps take several days."
Regarding the original question, it looks like the point indices coincide, but to be sure I've asked the developers for confirmation.
On 27/10/2005 at 08:32, xxxxxxxx wrote:
Ok Thanks Michael.
On 31/10/2005 at 03:00, xxxxxxxx wrote:
The response from the developers is that usually the points stay the same, and no reordering is done. However you should never rely on this when you access the arrays. At least you should check the counts, so that you don't read beyond the array if the point count would change in some occasion. The same is true for polygons. (One case where the polygons *are* changed is when SPD is enabled, then all polygons are triangulated.)