Page 1 of 1

Where does the unit F stand for?

Posted: Fri Jan 01, 2010 6:36 pm
by roelor
Hello, while rescaling my texture on a plane a while ago I was forced to fill in a value and just look how it becomes. Say I want a textured schaled 2 times as small on a 128*128 plane, how do I find the good value for irrlichts plane mapping? Its a value with F. (If I knew what it stands for, I wouldnt be typing this right now :P.)

Posted: Fri Jan 01, 2010 6:54 pm
by DtD
http://en.wikipedia.org/wiki/F_(disambiguation)
Fahrenheit
Farad
Faraday constant
Focal length
Force
Frequency

And none of thoose are what you really want :P

Basically: The f means float.

Long explanation stuff:
Anyway, are you reffering to how you see numbers 0.5f 1.f and etc? The f is not the unit, f just tells the compiler that "this number is a floating point number" (without it, if it has a decimal the compiler assumes it is a double)

Basically, a Float and a double are ways of representing large numbers and decimal numbers on computers. Iirc, Doubles are considered very fat and should be avoided. Floats are commonly used in Irrlicht (and other 3D things) for representing 3D coordinates. So (0.f,0.f,0.f) represents the center of the 3D "world" (0.f,1.f,0.f) would represent one unit "in the air" above the world's center. (With Irrlicht anyway, it is a left-handed coordinate system by default)

The units don't represent anything specifically. If you are using a physics engine with your game, they generally are meters. (Unless you scale the world)

I hope this answers your question! (Hopefully I remembered everything right :lol: )

~DtD

Posted: Sun Jan 10, 2010 9:44 pm
by roelor
Hmm, (sorry for the old bump). But I still don't quite understand.
I have this,
smgr->getMeshManipulator()->makePlanarTextureM3.0 mapping(grmesh->getMesh(0), 0.0236f);
To make a 3*(128x128) plane look like it doesn't move when it moves via a grid to simulate unlimited terrain. (I set the scale to 3).
But this value doesn't make any cense to me at all.. I want to fill in something like 128x128 or 0.33 (one third.)

Or can I just use a vector for that?

Re: Where does the unit F stand for?

Posted: Wed Jan 13, 2010 7:30 am
by rekk1986
roelor wrote:Hello, while rescaling my texture on a plane a while ago I was forced to fill in a value and just look how it becomes. Say I want a textured schaled 2 times as small on a 128*128 plane, how do I find the good value for irrlichts plane mapping? Its a value with F. (If I knew what it stands for, I wouldnt be typing this right now :P.)
in my opinion, F stand for False or float. do you have another ideals??

Posted: Wed Jan 13, 2010 8:58 am
by hybrid
I guess it's already clear that the floating point qualifier is meant. The question now is what the resolution value of the planarTextureMapping means. IIRC, this value is not normalized to [0,1], but depends on the size of the mesh. Hence you will have to take into account how large your mesh is. But, using a hillPlaneMesh seems to make more sense, it already has proper texture mapping and you can scale the texture on generation or via texture matrices.