WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   how to draw a single point (https://forum.worldviz.com/showthread.php?t=5227)

aaaa 11-13-2014 04:24 PM

how to draw a single point
 
Excuse me, the code bellow can't draw a single dot:

import viz
viz.go()
viz.startLayer(viz.POINTS)
viz.vertex(0,1.8,1)
viz.endLayer()

the code bellow can draw two points:

import viz
viz.go()
viz.startLayer(viz.POINTS)
viz.vertex(0,1.8,1)
viz.vertex(0,1.7,1)
viz.endLayer()


My problem is how to draw a single dot.

farshizzo 11-13-2014 05:48 PM

You will need to disable culling on the object, since a single point will result in a infinitely small bounding box. Try the following code:
Code:

import viz
viz.go()
viz.startLayer(viz.POINTS)
viz.vertex(0,1.8,1)
points = viz.endLayer()
points.disable(viz.CULLING)


aaaa 11-17-2014 01:26 AM

Thanks very much


All times are GMT -7. The time now is 09:06 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC