Thank you very much, it was exactly something like that I was looking for.
I'm primarily using the ShapeDrawables for some prototyping, and I will be 
replacing them at a later stage of the project.

Jesper D. Thomsen
________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Paul Melis 
[[email protected]]
Sent: Thursday, January 22, 2009 3:59 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Creating ellipsoids from ShapeDrawables?

Hi,

Jesper D. Thomsen wrote:
> Is it possible to create an ellipsoid from ShapeDrawable(sphere shape)
> by applying some kind of scaling,
Sure, just put the relevant transform node above the a Geode that holds
the ShapeDrawable, i.e.
transform -> Geode -> ShapeDrawable
> I thought that maybe there was som kind of ScalingTransform kind of
> like PositionAttitudeTransform.
Well, there is the general MatrixTransform that you can use to define a
transformation using a 4x4 matrix.
For a scale it can be used as (pseudo-code):

mt = new osg::MatrixTransform(osg::Matrix::scale(sx, sy, sz))

Note that ShapeDrawable is indeed nice for quickly generating shapes,
but if you want more functionality (specifically texture mapping) it
isn't supported by it.

Paul
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to