Vizard 7 » Command Index » Vizard objects » node3d » <node3d>.billboard
7.7

<node3d>.billboard

This will set the billboarding mode of the object

<node3d>.billboard(  
mode = viz.BILLBOARD_VIEW  
)  
mode = viz.BILLBOARD_VIEW
One of the following billboard modes:

Billboard mode

viz.OFF

Disable billboarding (default).

viz.BILLBOARD_VIEW

Node will rotate to align with current view direction.

viz.BILLBOARD_VIEW_POS

Node will rotate towards current view position.

viz.BILLBOARD_YAXIS_LOCAL

Node will rotate along local Y-axis towards current view position.

viz.BILLBOARD_YAXIS_GLOBAL

Node will rotate along global Y-axis towards current view position.

viz.BILLBOARD_XYAXIS_LOCAL

Node will rotate along local XY-axis towards current view position.

viz.BILLBOARD_XYAXIS_GLOBAL

Node will rotate along global XY-axis towards current view position.

viz.BILLBOARD_SCREEN_PIXELS

Node will be displayed as if rendered to the screen. It will be rendered orthographically and scale coordinates will be in pixels.

viz.BILLBOARD_SCREEN_WORLD

Node will be displayed as if rendered to the screen. It will be rendered orthographically and scale coordinates will be in world.

Remarks

viz.BILLBOARD_VIEW_POS is useful for having text labels that you always want to be facing the viewer. viz.BILLBOARD_YAXIS_LOCAL is useful when you have a tree texture that you want to rotate with the viewer, but still remain upright.

Return Value

None

Example

ball = viz.add('ball.wrl')
ball.billboard()

quad = viz.addTexQuad()
tree = viz.addTexture('tree.jpg')
quad.texture(tree)
quad.billboard(viz.BILLBOARD_YAXIS_LOCAL)

See also

<node3d>.getBillboard
<node3d>.setAutoScale
<viz>.addText
<viz>.addTexQuad