Re: Trees and other Billboards...
Michael Jones (mtj++at++babar)
Mon, 11 Dec 1995 08:50:23 -0800
On Dec 8, 12:05pm, Andreas Paumann wrote:
> Subject: Trees and other Billboards...
:Hi there,
:
:I am quite new to performer programming and have a question concerning
:Billboards:
:
:I load an Inventor file (a garden with a house, etc.). In this garden there
:are also trees. If Inventor loads them he makes 'pfGeode's out of my trees.
:I now recursivly scan through the nodes and replace all pfGeodes representing
:a tree by Billboards. I do this by copying the GeoSets of the pfGeodes and
:creating a new Billboard and then doing a Replacechild! So far so good. If I
:load now the scene, everything looks ok, BUT: The trees (if driving around)
:move around on the floor. How can I tell performer to rotate the trees, but
not
:to move around. The BillBoards are of type 'AXIAL_ROT' with a rotation axis of
:(0,0,1).
:
:many thanx in advance
:
:Andy
:
>-- End of excerpt from Andreas Paumann
billboards rotate about the origin.
what you want to do is to translate each one to 0,0,0
but specify the position of each geoset as the original
location.
i can imagine something like:
for each geoset in the billboard:
get it's bounding box
compute the midpoint
subtract the midpoint from all vertices
set the midpoint as the position (using billboard API)
michael jones
(in ee cummings mode)
--
Be seeing you, Phone:415.933.1455 Fax:415.965.2658 M/S:8U-590
Michael T. Jones Silicon Graphics, Advanced Systems Division
mtj++at++sgi.com 2011 N. Shoreline Blvd., Mtn. View, CA 94039-7311
"Du musst Amboss oder Hammer sein" -- Goethe
This archive was generated by hypermail 2.0b2
on Mon Aug 10 1998 - 17:52:07 PDT