Hi David,

have a look at osg::AutoTransform

On Mon, Jan 7, 2019 at 1:41 AM David Mitchell <mooha...@gmail.com> wrote:

> I have certain nodes/objects in my scene that I always want to be the same
> size regardless of their distance from the camera and I'm trying to figure
> out the best way to go about doing this.  My first thought is to create a
> custom NodeCallback to add to the node as a cull callback and then get the
> distance from the node to the camera and apply the appropriate scale to the
> node (as a MatrixTransform).  Is that a reasonable approach?
>
> The other thing I'm struggling with is how to calculate the proper scale.
> What I'd like is for the object's geometry to translate to pixel units,
> meaning if the vertices range from (-10, -10, -10) to (10, 10, 10), then it
> would take up roughly 20x20 pixels on the screen when scaled.  Rather than
> fumbling around with different matrices and transforms trying to get this
> to work, I thought I'd try asking first.
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75383#75383
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
trajce nikolov nick
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to