Gena wrote:
>
> I have to apply transformations (scale/rotate/translate) on triangles.
> Mesh syntax doesn't allow transformations for triangles. So I decided
> to create separate array of triangles and then build mesh based on
> that array. It doesn't work.
>
> If I'll keep vectors (triangles' vertices) instead of triangles in that array
> what's the best way to apply transformations on those vertices ?
>
You can use the 'vtransform()' macro. If you apply the same transform to
a lot of vertices it will be more efficient to declare the transform
function once and apply it to the vertices. See the 'vtransform()'
declaration in 'transforms.inc' for how this can be done.
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 31 Dec. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|