HI Peter
 
Its really is as simple as Paul says, 
 
a Node Kit simply extends a basic OSG node to do a specialised task not
support directly by the core node types,  just as an osg::Group derives from
osg::node and to provide a method to group one or more nodes , while a
osg::Transform provides a node method of introducing a matrix to trans form
any nodes attached etc. or how osg::LOD extends nodes to allow its children
to swapped in depending on there distance from the viewer or size on the
screen etc
 
Basically the OSG calls specialised nodes like osgFX or osgParticle  Node
kits because they extend the concept of the node to add something of value
by deriving from a a node of some type, think of it more in terms of an
extension of capabilities rather than a kit, that's how I seem them simply
as feature and capabilities extension to the OSG .
 
 
Look at anyone one of the existing OSG nodes, the header shows you what you
need to do. look at the osg::Node header and the virtual's etc, then say
look at osg::LOD ( quite simple how it extends osg::Group ) look at the
virtual's, note the macro META_Node this sets up most of the required
functions a derived node requires
 
Typically to derive your own node at a minimum you need
 
to 
 
use META_Node(....)
provide a default constructor
provide a copy constructor
 
a protected destructor as all nodes a ref counted based objects
and in most cases a  computeBound();
 
then add you specialisations that you want the node to provide etc..
 
 
 
 
  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Peter Wraae
Marino
Sent: Friday, June 13, 2008 2:10 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osg Node kits


Hi Paul,
 
That's basically what it states in that link I supplied.
 
words like "derives new Nodes" would make me think I would have to derive
from something else than osg:Node??
and you mentioned link the NodeKit library? which library? is in the osg
project or another repositorary¨?
 
When I look at osgFX i.e. the Cartoon effect it derives from osgFX::Effect
which in turn derives from osg::Group - which makes me think what is the
difference? there is no nodekit involved? or is there? You said that I need
to link
with a nodekit libaray and does this mean I have to use certain functions in
that library? and if so,,.. which?
 
Confused,
Peter


On Thu, Jun 12, 2008 at 10:22 PM, Paul Martz <[EMAIL PROTECTED]> wrote:


The OSG Quick Start Guide (www.osgbooks.com <http://www.osgbooks.com/> )
defines a NodeKit as a library that derives new Nodes, Drawables, or
StateAttributes from core OSG classes, and provides support for the .osg
file format for these new objects. But I'd like to hear Robert's definition.
 
Use them just like any core OSG Node, Drawable or StateAttribute, but note
that your app will now have to link with the NodeKit library.
   -Paul
 


  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Peter Wraae
Marino
Sent: Thursday, June 12, 2008 12:36 PM
To: [email protected]
Subject: [osg-users] osg Node kits


Hi users,
 
I'm trying to understand the concept of a node kit, but the documentation is
very limited:
http://www.openscenegraph.org/projects/osg/wiki/Support/KnowledgeBase/NodeKi
t 
 
I believe that the osgFX is a node kit? what is it that defines a node kit?
and how does one use them? perhaps someone can give an example how to apply
the cartoon effect?
 
I can see that they register themselves, does this mean I can apply them to
any object
runtime?
 
anyone?
Peter


_______________________________________________
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