how

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.
Post Reply
jimon
Posts: 20
Joined: Sun Nov 20, 2005 7:46 pm
Location: Ukraine, Kiev

how

Post 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) ?

:roll:

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 »

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(..)
YASS - Yet another Space Shooter
under Devolpment, see http://yass-engine.de
Guest

Post 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! :)
jimon
Posts: 20
Joined: Sun Nov 20, 2005 7:46 pm
Location: Ukraine, Kiev

Post by jimon »

very thanks :)
my english is very bad,sorry
bearSoft
Posts: 165
Joined: Fri Apr 01, 2005 9:55 pm
Location: Denmark

Post 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
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
jimon
Posts: 20
Joined: Sun Nov 20, 2005 7:46 pm
Location: Ukraine, Kiev

Post by jimon »

i have a problem with cpp :roll:

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 »

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 »

thanks :)
my english is very bad,sorry
jimon
Posts: 20
Joined: Sun Nov 20, 2005 7:46 pm
Location: Ukraine, Kiev

Post 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 ? :(
my english is very bad,sorry
Post Reply