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.
jimon
Posts: 20 Joined: Sun Nov 20, 2005 7:46 pm
Location: Ukraine, Kiev
Post
by jimon » Tue Nov 29, 2005 6:34 pm
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)
my english is very bad,sorry
MasterD
Posts: 153 Joined: Sun Feb 15, 2004 4:17 pm
Location: Lübeck, Germany
Contact:
Post
by MasterD » Tue Nov 29, 2005 6:52 pm
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(..)
Guest
Post
by Guest » Tue Nov 29, 2005 7:16 pm
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!
jimon
Posts: 20 Joined: Sun Nov 20, 2005 7:46 pm
Location: Ukraine, Kiev
Post
by jimon » Wed Nov 30, 2005 11:58 am
very thanks
my english is very bad,sorry
jimon
Posts: 20 Joined: Sun Nov 20, 2005 7:46 pm
Location: Ukraine, Kiev
Post
by jimon » Tue Dec 06, 2005 6:53 pm
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);
........
}
my english is very bad,sorry
pfo
Posts: 370 Joined: Mon Aug 29, 2005 10:54 pm
Location: http://web.utk.edu/~pfox1
Post
by pfo » Tue Dec 06, 2005 7:05 pm
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)
jimon
Posts: 20 Joined: Sun Nov 20, 2005 7:46 pm
Location: Ukraine, Kiev
Post
by jimon » Tue Dec 06, 2005 7:29 pm
thanks
my english is very bad,sorry
jimon
Posts: 20 Joined: Sun Nov 20, 2005 7:46 pm
Location: Ukraine, Kiev
Post
by jimon » Wed Dec 07, 2005 4:54 am
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 ?
my english is very bad,sorry