Size Of Positioning Shafts In OpenMW-CS

Involved development of the OpenMW construction set.
User avatar
MrAnonGuy
Posts: 42
Joined: 26 Aug 2016, 01:21

Re: Size Of Positioning Shafts In OpenMW-CS

Post by MrAnonGuy » 07 Sep 2016, 11:17

aesylwinn wrote: 1. Get rid of the static constants definitions in the header and source files.
2. #include "../../model/prefs/state.hpp"
3. Replace constant definitions with state retrieval like so in the member functions:

Code: Select all

const float MarkerShaftWidth = CSMPrefs::get()["General Input"]["MarkerShaftWidth"].toDouble();
Just to note, this method will not resize already existing markers. You will have to re-select the object.
Thanks aesylwinn,

That was the nudge I needed to get me moving the right direction. Works great.
shafts1.jpg
shafts2.jpg
Considering this wasn't possible at all, as the markers obscured smaller objects, selecting the object after making manual changes to marker scaling values isn't much of a problem. So, how much trouble is it to determine the distance from the object to the camera, in order to add an autoscaling factor?

Thanks!

aesylwinn
Posts: 211
Joined: 14 Dec 2015, 20:30

Re: Size Of Positioning Shafts In OpenMW-CS

Post by aesylwinn » 07 Sep 2016, 18:33

It would involve:
1. Getting access to the osg::Camera instance when creating the marker node
2. Creating a class that inherits from osg::NodeCallback; this is where the code to update the object's scale would go
3. Attach the callback class to the marker node

Not something for the faint of heart. ;)

User avatar
scrawl
Posts: 2046
Joined: 18 Feb 2012, 11:51
Contact:

Re: Size Of Positioning Shafts In OpenMW-CS

Post by scrawl » 07 Sep 2016, 18:36

Why not scale based on the object's bounding box instead?

aesylwinn
Posts: 211
Joined: 14 Dec 2015, 20:30

Re: Size Of Positioning Shafts In OpenMW-CS

Post by aesylwinn » 07 Sep 2016, 18:48

The main problem is that the marker gets difficult to click on at large distances when you have a set width. The objects are already lengthened with the bounding box. But the width should also be made to scale with the bounding box. That would fix the issue to some degree.

User avatar
MrAnonGuy
Posts: 42
Joined: 26 Aug 2016, 01:21

Re: Size Of Positioning Shafts In OpenMW-CS

Post by MrAnonGuy » 08 Sep 2016, 00:20

aesylwinn wrote:It would involve:
1. Getting access to the osg::Camera instance when creating the marker node
2. Creating a class that inherits from osg::NodeCallback; this is where the code to update the object's scale would go
3. Attach the callback class to the marker node
I see. So, the main task is to hook into the code that positions the camera, so the markers can be scaled as the camera moves. On the surface, it doesn't sound too bad and I'm sure I could work my way thought it.

Having said that, I'm not so sure the openmw project is such a good fit for me, as least at this point. I think it's time for me to fade back into the æther. I do want to thank you for helping me with the issues I had, as well as taking the time to answer my questions. I really do appreciate that. I wish you well in all your future endeavours.

aesylwinn
Posts: 211
Joined: 14 Dec 2015, 20:30

Re: Size Of Positioning Shafts In OpenMW-CS

Post by aesylwinn » 08 Sep 2016, 01:36

That's unfortunate. In any case, it was a pleasure working with you. Good luck to you as well.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest