|
![](/i/fill.gif) |
I was wading through the POV-Ray source code and noticed to my little
surprise that mesh is not the only primitive which uses reference counting
to save memory (ie. if you #declare such primitive and then insantiate
it several times, the main data will be kept in memory only once).
These primitives use reference counting at least for part of their data:
blob
heightfield
lathe
mesh
polygon
prism
sor
Just for fun I also looked which primitives use transformation
optimizations (a transformation optimization means that if you for
example make a sphere and translate it, no transformation matrix
will be created, but the center of the sphere will just be moved).
These primitives use transformation optimization (along with which
transformations they optimize):
bicubic_patch: All transformations are applied directly to the points
box: translate, scale
plane: translate, rotate, scale
quadric: All transformations are applied to the quadric itself
sphere: translate, rotate, uniform scale
sphere_sweep: translate, rotate, uniform scale
triangle: All transformations are applied directly to the points
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |