Hi,
Im also a beginner, but as far as i saw in the docs , it seems
that you have to use
void osg::GrabForegroundBase::setImage ( const ImagePtr &
value ) [inline]
and in this way you can retrieve an osg::Image, which you can save where you
want.
http://www.opensg.org/doc-1.2.0/PageSystemWindow.html#PageSystemWindowForegr
oundGrabFile
contains also some text on this topic.
hope it helps,
michi
----- Original Message -----
From: "Dominik Rau" <[EMAIL PROTECTED]>
To: <[email protected]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, October 21, 2003 2:20 PM
Subject: Documentation and fileGrabForeground (was: Re: [Opensg-users]
CoredNodePtr and Node sharing)
> Dirk Reiners wrote:
>
> >> I think the problems arise out of the techniques which are hardly, bad
or
>
> >>even not at all documented.
> >>
> >>This from a beginner.
> >
> >
> >cool, we got an actual beginner. Great! ;)
> >
>
> Hi.
>
> Well, there are some more of us - especially here at the University of
> Koblenz, where we've got some OpenSG-Hype. ; )
>
> >Could you give me an example (or more than one) about the techniques
> >you're thinking of that are not described well?
> >
> I don't think that the problem are the concepts and techniques in general,
> they are, as Pascal already said, described in the related pages /
tutorials
> quite well. The problems occur with smaller, trivial things that are not
> documented at all. Here's an example:
>
> We're writing a Radiosity System that uses OpenSG mainly for the reading
of
> the scene files and to display the results. Therefore, we also work on the
> OpenSG-Types like vec3f etc. that's all, no big deal so far. Now I have to
> write a paper about it (it's my Studienarbeit, sorry, I don't know the
exact
> english term ) which needs some screenshots. Now follow me on my quest
through
> the docs:
>
> * First I have a look at the related Pages Section, and find the
> filegrabforeground in the windows section. This looks like what I want, so
I go on to
> the class description of it. What I know from here is that I have to set a
> filename. It's not mentioned anywhere, but I guess, that OSG will
determine
> the image-type from the extension, so I hope that setName("output.png")
works.
>
> * Ok, there's a method called draw(), that I have to use (could someone
> explain me why this func is protected?!) to write the image and which
needs a
> pointers to DrawAction and the Viewport as arguments.
>
> * What's a DrawAction?! I have a look at the RelatedPages again and find
out
> (well, I knew it before...) that actions are used to traverse the
> scenegraph, but there's no word about DrawActions. Well, I guess that,
because I want
> to draw the whole graph, I have to create that DrawAction Object with the
> root Node of my scenegraph, so I try the following:
> OSG::DrawActionBase *da=OSG::DrawAction::create();
> da->apply(m_sceneGraph);
> gcc stays silent, so I hope I'm on the right way although I don' t know
what
> I'm doing anymore.
>
> * Ok, now I need the ViewPort of my Window. According to the Documentation
> (Ctrl+F in the CompoundMembers Section) I get a Ptr to the ViewPort by
calling
> getPort( const UInt index ), although there again is not a single line of
> documentation.
>
> So in the end, I've got the following (not working, please help) code:
>
> OSG::FileGrabForegroundPtr
fg=OSG::FileGrabForeground::create();
> fg->setName("ouput.png");
> OSG::DrawActionBase *da=OSG::DrawAction::create();
> da->apply(m_sceneGraph);
>
> fg->draw(da,(m_renderWidget.getManager()->getWindow()->getPort(0)));
>
> After 2 hours of trying some variants and reading empty doxygen created
docs
> I give up and go on using ksnapshot and gimp to create my screenshots,
which
> is frustrating too, but at least works...
>
> I have a dream of a fully, QT- or SWING-like documented OSG, where I don't
> have to be a ./src/*-reading template guru or clairvoyant to know what
code I
> have to write. Where such easy things like taking a screenshot are
mentioned
> in a little "Example" part of the class documentation and every(!) method
> has at least one or two sentences about its functionality, documented
> parameters and return values. So please: Stop implementing (for a little
while) and
> start documenting! I know that this needs some efforts, but OSG is far too
> complicated to be self-explaining. With a documentation in the current
form,
> OpenSG is hardly usable for beginners.
>
> Regards,
> Dominik
>
> --
> NEU FÃR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
> Fotoalbum, File Sharing, MMS, Multimedia-GruÃ, GMX FotoService
>
> Jetzt kostenlos anmelden unter http://www.gmx.net
>
> +++ GMX - die erste Adresse für Mail, Message, More! +++
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by OSDN developer relations
> Here's your chance to show off your extensive product knowledge
> We want to know what you know. Tell us and you have a chance to win $100
> http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
>
-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users