Page 1 of 1
how
Posted: Tue Nov 29, 2005 6:34 pm
by jimon
how i can set color to some ISceneNode objects ?
how i can set texture size (not rect size,size of texture on objects) ?
and how i can create some standart objects on irrlicht ? (sphere,piramyde and other)
Posted: Tue Nov 29, 2005 6:52 pm
by MasterD
afaik you can only change color with a different texture (e.g. blue/red/.. texture
the texture size on objects are saved and modified using a Modelling / Mapping Program, you can only create different kinds of planar mapping on
runtime and change the scale of the detailmap from an ITerrainSceneNode
the only "standard object" in irrlicht is a box, smgr->addTestSceneNode(..)
Posted: Tue Nov 29, 2005 7:16 pm
by Guest
1. how to set material colors:
http://irrlicht.sourceforge.net/phpBB2/ ... 8831#58831
2. look at makePlanarTextureMapping, that way you can "scale" the textures of "objects" (nodes) i think thats what you are looking for.
3. you can create a custom scene node and add default models yourself, otherwise you just have, like master said, a testSceneNode
good luck!
Posted: Wed Nov 30, 2005 11:58 am
by jimon
very thanks
Posted: Thu Dec 01, 2005 9:21 am
by bearSoft
for standart objects on irrlicht:
Emil Halim have made a class for IRR primitives
http://www.irrforge.org/index.php/Prima ... r_Irrlicht
Posted: Tue Dec 06, 2005 6:53 pm
by jimon
i have a problem with cpp
how i can read variables (int, float and other) use fgetc ?
ok... i can read int
but how i should read float ?!
Code: Select all
....
int FILE_read_int(FILE * file)
{
return fgetc(file)+fgetc(file)*256+fgetc(file)*256*256+fgetc(file)*256*256*256;
}
.....
void main()
{
....
FILE *file;
file = fopen( file_name, "r" );
int a1;
a1=FILE_read_int(file);
........
}
Posted: Tue Dec 06, 2005 7:05 pm
by pfo
try fscanf, its like reverse fprintf:
Code: Select all
fscanf(file, "%f", &floating_point_var);
Note that you need to pass the address of a variable (using the & operator)
Posted: Tue Dec 06, 2005 7:29 pm
by jimon
thanks
Posted: Wed Dec 07, 2005 4:54 am
by jimon
Code: Select all
FILE *file;
file = fopen( file_name, "r" );
float zz;
zz=110;
fscanf(file, "%f", &zz);
in file :
CD 4C 9A 44
(in float - 1234.4)
what i doing wrong ?