Hi,
Quoting Scott Johnson <[EMAIL PROTECTED]>: > Hi everyone: > > Is there a reason why csTriangulate2 is named as it is? At first, I > thought it was because it was a 2D triangulation routine, but it doesn't > appear this is the case - the csContour typedef is a series of vertices, > and they are given as csVector3's, which I take to mean they are 3-D. > However, the Area() function does seem to only calculate the 2D > cross-product. csTriangulate2 was added to CS by Christoph when working on AWS(2). If you look closer you'll see that it takes csVector2, ie 2d vertices. Looking at the code suggest that it does some 2d variant of ear clipping. The comment in the header also clarify that it will only triangulate polygons without holes. > > At any rate, I was thinking that since I need to extend this class, I > was wondering if there is a reason it's not implemented using SCF - that > is, has an iTriangulate interface, with multiple possible > implementations. Would anyone be opposed to me changing this slightly? Yes. SCF classes carry a certain overhead by requireing all of the methods to be virtual. This means that it should _not_ be used for basic helper classes, which csTriangulate2 is. Also I don't see any reason you want to use a triangulator but let someone else decide which algorithm to use. Apart from that, I think you need a 3D triangulator which means the interface of csTriangulate2 won't do. -Marten ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Crystal-main mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/crystal-main Unsubscribe: mailto:[EMAIL PROTECTED]
