create entity from points
- breakdance
- Gnoblar
- Posts: 15
- Joined: Thu Mar 13, 2008 1:46 am
- Location: Bucharest
- Contact:
create entity from points
Can pls tell me how to make a entity from a bunch of points (coordinates read from a text file) ? -like a graph for a function
- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact:
- breakdance
- Gnoblar
- Posts: 15
- Joined: Thu Mar 13, 2008 1:46 am
- Location: Bucharest
- Contact:
-
warmi
- Gnoll
- Posts: 674
- Joined: Sun May 27, 2007 3:56 am
- Location: USA
Check this out:
http://www.ogre3d.org/wiki/index.php/ManualObject
Make sure to change RenderOperation to be OT_POINT_LIST...
http://www.ogre3d.org/wiki/index.php/ManualObject
Make sure to change RenderOperation to be OT_POINT_LIST...
- breakdance
- Gnoblar
- Posts: 15
- Joined: Thu Mar 13, 2008 1:46 am
- Location: Bucharest
- Contact:
where did I go wrong!!??
// read coordinates
FILE *fisierX;
FILE *fisierY;
fisierX = fopen("valoriX.txt","rt");//placed in \OgreSDK\bin\debug\
fisierY = fopen("valoriY.txt","rt");
k=0;//integer
ManualObject* manual = mSceneMgr->createManualObject("manual");
manual->begin("BaseWhiteNoLighting", RenderOperation::OT_LINE_STRIP);
while ( k<100 )
{
fscanf(fisierX,"%i",&xCitit); //integer
fscanf(fisierY,"%i",&yCitit); //integer
manual->position(xCitit, yCitit, 0.0);
k++;
}
manual->end();
mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(manual);
fclose(fisierX);
fclose(fisierY);
it says trere's an error with fscanf
pls help
// read coordinates
FILE *fisierX;
FILE *fisierY;
fisierX = fopen("valoriX.txt","rt");//placed in \OgreSDK\bin\debug\
fisierY = fopen("valoriY.txt","rt");
k=0;//integer
ManualObject* manual = mSceneMgr->createManualObject("manual");
manual->begin("BaseWhiteNoLighting", RenderOperation::OT_LINE_STRIP);
while ( k<100 )
{
fscanf(fisierX,"%i",&xCitit); //integer
fscanf(fisierY,"%i",&yCitit); //integer
manual->position(xCitit, yCitit, 0.0);
k++;
}
manual->end();
mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject(manual);
fclose(fisierX);
fclose(fisierY);
it says trere's an error with fscanf
pls help
- breakdance
- Gnoblar
- Posts: 15
- Joined: Thu Mar 13, 2008 1:46 am
- Location: Bucharest
- Contact:
- iloseall
- Gremlin
- Posts: 156
- Joined: Sun Sep 14, 2003 3:54 am
- Location: Beijing China
- Contact:
