Brad Colbert | 22 Jun 2012 00:23
Favicon

LightPointNode BlinkSequence class modification questions.

Robert,

How would you feel about changing  the osg::Vec4 BlinkSequence::color(double time,double length) const
to virtual?

I would like to customize the behaviour of this call but I'm currently unable to because it is inlined and not virtual.

Thank you!

Cheers,
Brad

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48419#48419

Robert Osfield | 22 Jun 2012 11:19
Picon

Re: LightPointNode BlinkSequence class modification questions.

HI Brad,

On 21 June 2012 23:23, Brad Colbert <bcolbert@...> wrote:
> How would you feel about changing  the osg::Vec4 BlinkSequence::color(double time,double length)
const to virtual?
>
> I would like to customize the behaviour of this call but I'm currently unable to because it is inlined and
not virtual.

The method is original inline for performance reasons so the question
I'd pose is simply what performance impact would we see with changing
to virtual.  This would depend on just how many light points in the
scene might have a BlinkSequence attached.  How many are you using or
would you expect to be used on screen at any one time?

Robert.
Brad Colbert | 22 Jun 2012 16:33
Favicon

Re: LightPointNode BlinkSequence class modification questions.

Hello Robert,

My gut tells me that the time to make a call to a virtual function versus inlined code is far less than the
actual code being executed.  That said, a little gedanken experiment to get an idea of how many blinking
lights we may have to deal with is in order:

Let us say, for the sake of argument, for a flight simulation in a non urban area it would be a couple per
aircraft.  Given that most simulations tend to not have a lot of aircraft then we aren't talking about a lot. 
Let's say 10 (why not :) ).

In an urban environment we are talking about hazard lights to indicate large towers and buildings of
significant height (relative to the surrounding buildings).  Let's say 100 buildings (including
towers), each with a few lights, so 300.  Generally not all of those lights will be in the field of view, and it
wouldn't be prudent to render them all of the time at distance (LOD controlled).

So, let's say our worse case is 310 lights.

My analysis may be a bit self serving but I don't feel that it will be a noticeable issue in the general case.

-B

-----Original Message-----
From: osg-users-bounces@...
[mailto:osg-users-bounces <at> lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: Friday, June 22, 2012 2:19 AM
To: osg-users@...
Subject: Re: [osg-users] LightPointNode BlinkSequence class modification questions.

HI Brad,

(Continue reading)


Gmane