Drawing lines in Balloon3D?
Bert Freudenberg
bert at impara.de
Mon Aug 28 08:47:47 UTC 2006
Rich Warren schrieb:
>
> On Aug 27, 2006, at 9:50 PM, Bert Freudenberg wrote:
>
>> Am 28.08.2006 um 03:26 schrieb Rich Warren:
>>
>>> Does anyone know how to draw lines in Balloon3D? I want to add
>>> simple, straight lines to a surface graph (based on the surface graph
>>> tutorial).
>>
>> It's not supported by the plugin. There are hooks for polylines in the
>> API though, I once implemented those using Balloon2D (meaning they
>> could not be hidden behind a 3D mesh). Very long time ago, not sure if
>> I can find it - it was more a hack than anything else.
>>
>> Your best bet would be to just construct a tube mesh connecting the
>> nodes.
>>
>> - Bert -
>>
>>
>
> Well, that's disappointing. I was hoping to make lines that would appear
> at a given width regardless of the distance to the camera. These would
> be the X, Y and Z origins for a data surface, so they would need to be
> able to correctly penetrate solid objects.
>
> The tube idea is probably the best bet--though they may disappear when I
> zoom out.
You could adjust their width on the fly depending on current zoom factor
/ distance, which would mimic a line primitive. You could also make them
longer, something that a built-in line would not do automatically.
Doing this on your own is also more predictable - like, Direct3D would
not even support wide lines, whereas OpenGL does.
- Bert -
More information about the Squeak-dev
mailing list
|