POV-Ray : Newsgroups : moray.win : Redrawing scene after transformation in plugin Server Time
3 May 2024 05:41:51 EDT (-0400)
  Redrawing scene after transformation in plugin (Message 1 to 5 of 5)  
From: Doug
Subject: Redrawing scene after transformation in plugin
Date: 8 Jul 2004 18:55:00
Message: <web.40edcfe0e5234cf5ded0eafc0@news.povray.org>
Here's the basic code (simplified a bit) for the function I have that I
thought should handle this:

long WINAPI SceneEvent(long hObjID,int nFlags)
{
 switch (nFlags)
 {
  case MRY_NTC_OBJ_TRANSFORMED :
  {
   err_log << "TRANSFORMED : "<< hObjID << endl;

   g_pSceneFuncs->fnRedrawScene(MRY_SCN_DRW_RECALC &
MRY_SCN_DRW_REDRAW_IMMEDIATE);
  }
  break;
 }
 return(MRY_SUCCESS);
}





After the object is transformed in any way, the TRANSFORMED message is
indeed printed, but apparently the function underneith it, set to redraw
the scene, doesn't seem to have any effect on the scene at all.  Am I even
doing this remotely correctly?  Does anyone have any suggestions as to how
to get this to work, or even an easier way to go about doing it?


Doug Kavendek


Post a reply to this message

From: Doug
Subject: Re: Redrawing scene after transformation in plugin
Date: 8 Jul 2004 19:20:00
Message: <web.40edd6523f4c826fded0eafc0@news.povray.org>
Yet again, my message seems to have been beheaded, and the first paragraph
has gone missing.  I frankly don't understand what's doing that..  This
computer seems to like giving me troubles when using newsgroups..

Anyway, what I started off by saying was that I'm trying to make a plugin
such that its wireframe representation in Moray gets recalculated whenever
the object is transformed, since its current translation amount is used in
the wireframe calculation.  However, I can get it to update this only when
an actual attribute is modified in the "modified" tab.  I came up with a
way that I thought would do what I want, but it seems to ignore the
RedrawScene function I'm calling.


"Doug" <dka### [at] stevensedu> wrote:
> Here's the basic code (simplified a bit) for the function I have that I
> thought should handle this:
>
> long WINAPI SceneEvent(long hObjID,int nFlags)
> {
>  switch (nFlags)
>  {
>   case MRY_NTC_OBJ_TRANSFORMED :
>   {
>    err_log << "TRANSFORMED : "<< hObjID << endl;
>
>    g_pSceneFuncs->fnRedrawScene(MRY_SCN_DRW_RECALC &
> MRY_SCN_DRW_REDRAW_IMMEDIATE);
>   }
>   break;
>  }
>  return(MRY_SUCCESS);
> }
>
>
>
>
>
> After the object is transformed in any way, the TRANSFORMED message is
> indeed printed, but apparently the function underneith it, set to redraw
> the scene, doesn't seem to have any effect on the scene at all.  Am I even
> doing this remotely correctly?  Does anyone have any suggestions as to how
> to get this to work, or even an easier way to go about doing it?
>
>
> Doug Kavendek


Post a reply to this message

From: Remy Closset
Subject: Re: Redrawing scene after transformation in plugin
Date: 9 Jul 2004 03:00:39
Message: <40ee4297$1@news.povray.org>
I can't help for your plugin,but I support it. I think it's a very
interesting feature.

friendly



news:web.40edcfe0e5234cf5ded0eafc0@news.povray.org...
> Here's the basic code (simplified a bit) for the function I have that I
> thought should handle this:
>
> long WINAPI SceneEvent(long hObjID,int nFlags)
> {
>  switch (nFlags)
>  {
>   case MRY_NTC_OBJ_TRANSFORMED :
>   {
>    err_log << "TRANSFORMED : "<< hObjID << endl;
>
>    g_pSceneFuncs->fnRedrawScene(MRY_SCN_DRW_RECALC &
> MRY_SCN_DRW_REDRAW_IMMEDIATE);
>   }
>   break;
>  }
>  return(MRY_SUCCESS);
> }
>
>
>
>
>
> After the object is transformed in any way, the TRANSFORMED message is
> indeed printed, but apparently the function underneith it, set to redraw
> the scene, doesn't seem to have any effect on the scene at all.  Am I even
> doing this remotely correctly?  Does anyone have any suggestions as to how
> to get this to work, or even an easier way to go about doing it?
>
>
> Doug Kavendek
>
>
>


Post a reply to this message

From: Lutz Kretzschmar
Subject: Re: Redrawing scene after transformation in plugin
Date: 10 Jul 2004 13:06:36
Message: <id80f0dvbc96lecgaqe2s7drirqhgrioqq@4ax.com>
Hi Doug, you recently wrote in moray.win:

> ...but it seems to ignore the
> RedrawScene function I'm calling.
Yeah, this isn't thje right way. The only way to get a plugin object
to reinitialize it's wireframe representation is to call SetAttributes
on it with the OBJECT_SPECIFIC flag set. So try calling that instead
of the RedrawScene function.
 
Cheers,

- Lutz
  email : lut### [at] stmuccom
  Web   : http://www.stmuc.com/moray


Post a reply to this message

From: Doug
Subject: Re: Redrawing scene after transformation in plugin
Date: 12 Jul 2004 12:20:00
Message: <web.40f2b97a3f4c826fded0eafc0@news.povray.org>
Lutz Kretzschmar <lut### [at] stmuccom> wrote:
> Hi Doug, you recently wrote in moray.win:
>
> > ...but it seems to ignore the
> > RedrawScene function I'm calling.
> Yeah, this isn't thje right way. The only way to get a plugin object
> to reinitialize it's wireframe representation is to call SetAttributes
> on it with the OBJECT_SPECIFIC flag set. So try calling that instead
> of the RedrawScene function.
>
> Cheers,
>
> - Lutz
>   email : lut### [at] stmuccom
>   Web   : http://www.stmuc.com/moray



Thanks!  That's good to know.

Aha, and it works perfectly.  Many thanks.


-Doug Kavendek


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.