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.
move world around camera
Re: move world around camera
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
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Re: move world around camera
@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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: move world around camera
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.
Re: move world around camera
> 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.
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.
Re: move world around camera
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
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
Re: move world around camera
There is no demo yet but I have a blog where I posted most of my progress http://granyte.blogspot.ca/