I'm a newbie on OpenSceneGraph and 3D development.
I have a dxf file that contains a bunch of 3DPOLYLINES (with different
colors). So far I have been able to read and display them on a viewer, but I
haven been able to change the color of the rendered lines. I believe that I'm
not understanding
That's not really how it's done.
You can't add the Node you got from ReadNodeFile as a child of a Geode. I
don't even think that should compile because Geode isn't derive from
osg::Group.
What you need to do is create a visitor to travel through the children of
the "lines" Node (that Node is almo
Hello Chris,
Thank you for your answer.
My code, actually compiles, nevertheless I was expecting a conceptual error
from my side.
I will try what you suggest.
Cheers,
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75217#75217
__
Hi,
The suggestion of Chris solve the problem.
The actual code:
Code:
osg::Node* lines = osgDB::readNodeFile("lines.dxf");
osg::Geode* geode = new osg::Geode;
ColorVisitor newColor;
newColor.setColor( 1.0f, 0.0f, 0.0f );
topography->accept(newColor);
geode->addChild(lines);
_mViewer->setScen
I dunno man, your code is making my head explode. I don't think Geode HAS
an addChild method, so I don't even know why what you're doing would
compile.
I don't think I can help any further. I'm missing something or you are.
On Tue, Nov 20, 2018 at 5:46 PM Diego Mancilla wrote:
> Hi,
>
> The sug
Chris Hanson writes:
> I dunno man, your code is making my head explode. I don't think Geode HAS an
> addChild method, so I don't even know why what you're doing would compile.
>
> I don't think I can help any further. I'm missing something or you are.
>
Hi, Chris, Geode was subclassed from Grou
It happened when Drawable become a Node
On Wed, Nov 21, 2018 at 10:06 AM Alberto Luaces wrote:
> Chris Hanson writes:
>
> > I dunno man, your code is making my head explode. I don't think Geode
> HAS an addChild method, so I don't even know why what you're doing would
> compile.
> >
> > I don't
I guess I missed that one. I don't even know what it means to add a Node as
a child of a Drawable so I can't comment on why this works the way it does.
On Wed, Nov 21, 2018 at 10:11 AM Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:
> It happened when Drawable become a Node
>
> On Wed
"... to add a Node as a child of a Drawable ..."
child of a Geode ;-) .. Now Drawable as a Node can be as a Geode child
On Wed, Nov 21, 2018 at 9:58 PM Chris Hanson wrote:
> I guess I missed that one. I don't even know what it means to add a Node
> as a child of a Drawable so I can't comment on
Yeah, that's what I meant. Sorry. ;)
On Wed, Nov 21, 2018 at 10:13 PM Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:
> "... to add a Node as a child of a Drawable ..."
>
> child of a Geode ;-) .. Now Drawable as a Node can be as a Geode child
>
> On Wed, Nov 21, 2018 at 9:58 PM Chris
On Wed, 21 Nov 2018 at 20:58, Chris Hanson wrote:
> I guess I missed that one. I don't even know what it means to add a Node
> as a child of a Drawable so I can't comment on why this works the way it
> does.
>
Geode is really just a Group of Drawable, now that Drawable is a Node, it's
essentiall
11 matches
Mail list logo