move world around camera

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
AReichl
Posts: 269
Joined: Wed Jul 13, 2011 2:34 pm

Re: move world around camera

Post by AReichl »

You can do

template < typename EXTERN_t, typename INTERN_t >
class Test
{
public:
Test( EXTERN_t extern );
private:
INTERN_t intern;
};

and then

typedef Test< f32, f64 > Testf;

and so on.
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Re: move world around camera

Post by REDDemon »

AReichl wrote:what i would like to do is check all templates ( vector, matrix, quaternion, ... ) if they can be used for type 'double'. Not necessarily inside the engine ( that would require a lot of rework ), but outside of it. I already found some places where parameters are hardcoded ( e.g. epsilon for comparisons ), and of course and that violates the idea of templates. Would that be of interest for the engine?


I still not understeand why (and what you want to do).. do you have already a Idea?
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
CuteAlien
Admin
Posts: 9693
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: move world around camera

Post by CuteAlien »

@AReichl: Yeah, doing that per class instead of per function is also an option. Not sure if it's more or less confusing. In the case I mentioned with getting normals for <s32> vectors it wouldn't help (you need another return parameter there. But I must admit - this is all pretty low priority stuff for me. I still want to fix the epsilons because it's relatively little work so I can put it in between some time. But not too keen on completely reworking the core classes.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: move world around camera

Post by Granyte »

I though I posted here already ... Well if you are going to use bullet physics everything can be simplified a lot Since bullet can use double precision for all it's calculation all you have to do is translate every position when you sync with irrlicht. At least it's what I do in my space game and it works fine.
AReichl
Posts: 269
Joined: Wed Jul 13, 2011 2:34 pm

Re: move world around camera

Post by AReichl »

> I still not understeand why (and what you want to do).. do you have already a Idea?

Yes - my idea is to FIRST understand what is POSSIBLE ( the "basics" so to say ). THEN i will know what is achievable for a game. Of course when i look at the "planetary engine" at "Granyte and cie" ( http://granyte.blogspot.de/ ) i get frustrated and give up for some weeks, hehe. My idea is to write a simulator with REAL distances ( only the solar system first and the orbital mechanics don't have to be realistic ), let some spaceships fly around ( no First Person Controls ) and see what happens. I probably won't even need a physics engine or maybe i will use the small "Irrlicht Dedicated Physics Engine (DPE)", which i am just now rewriting for 'double' types ( see the comment about Bullet below ).

-----

> Well if you are going to use bullet physics everything can be simplified a lot Since bullet can use double precision for all it's calculation all you have to do is translate every position when you sync with irrlicht-

Ahhh - i never thought of that "combination" ( meaning Bullet with 'double' and Irrlicht with 'float' ) but that's really a good (and easy) solution, because in the end on the grafics card everything is 'float' anyway. With other engines ( e.g. Ogre and Bullet ) both have to have the same type.
AReichl
Posts: 269
Joined: Wed Jul 13, 2011 2:34 pm

Re: move world around camera

Post by AReichl »

Granyte: is there a download for your "Planetary Engine"? Maybe a demo or alpha version.
If it is so fantastic as it looks, you should write an article/paper about your mathematical/physical solutions.
The problem of huge spaces and how to visualise them stresses EVERY grafics engine and could be of interest just for academical reasons.

Here is an interesting link to a video that shows how they solved these kind of problems in the "Kerbal Space Program" ( written with Unity ):
https://www.youtube.com/watch?v=mXTxQko-JH0
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: move world around camera

Post by Granyte »

There is no demo yet but I have a blog where I posted most of my progress http://granyte.blogspot.ca/
Post Reply