From: David S. <dsc...@vy...> - 2001-02-24 19:52:13
|
> I'm a little desperate for access to triangle primitives to do some stuff > with > surfaces. A syntax similar to "curve" would seem ideal.(with the addition > of the ability to set alpha values). In principle you can get opaque triangles using convex - a convex shape with 3 vertices is a triangle. If your surface is the hull of a convex shape, you can of course use convex directly. def triangle(v1, v2, v3): return convex( pos=[v1,v2,v3] ) Adding a primitive in C++ that would behave similarly but more efficiently for triangles would be relatively easy. Alpha is harder, because to render translucent surfaces accurately, you need to draw them from back to front. At present, Visual doesn't need to sort most primitives (because they are drawn opaquely, and can be zbuffered). If you want to attack this, I can give you some pointers - but it will take some effort. > Haven't done much with c-extensions, so a little dependant here. Tell > me its not in the cards for the core cvisual, and I guess I'l give it > shot to see if I can build in into my own copy. Speaking only for myself: I won't have time to write a triangle primitive in the forseeable future. If you write a good one, however, I wouldn't oppose integrating it. Dave |