plib-users Mailing List for PLIB (Page 24)
Brought to you by:
sjbaker
You can subscribe to this list here.
2000 |
Jan
|
Feb
(24) |
Mar
(54) |
Apr
(29) |
May
(58) |
Jun
(29) |
Jul
(675) |
Aug
(46) |
Sep
(40) |
Oct
(102) |
Nov
(39) |
Dec
(40) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(45) |
Feb
(23) |
Mar
(30) |
Apr
(64) |
May
(28) |
Jun
(61) |
Jul
(55) |
Aug
(35) |
Sep
(24) |
Oct
(23) |
Nov
(21) |
Dec
(67) |
2002 |
Jan
(98) |
Feb
(23) |
Mar
(13) |
Apr
(23) |
May
(43) |
Jun
(45) |
Jul
(54) |
Aug
(5) |
Sep
(56) |
Oct
(17) |
Nov
(53) |
Dec
(26) |
2003 |
Jan
(67) |
Feb
(36) |
Mar
(22) |
Apr
(35) |
May
(26) |
Jun
(35) |
Jul
(10) |
Aug
(49) |
Sep
(17) |
Oct
(3) |
Nov
(30) |
Dec
(10) |
2004 |
Jan
(12) |
Feb
(18) |
Mar
(52) |
Apr
(50) |
May
(22) |
Jun
(13) |
Jul
(16) |
Aug
(23) |
Sep
(21) |
Oct
(29) |
Nov
(6) |
Dec
(26) |
2005 |
Jan
(9) |
Feb
(19) |
Mar
(13) |
Apr
(19) |
May
(12) |
Jun
(8) |
Jul
(6) |
Aug
(10) |
Sep
(22) |
Oct
(3) |
Nov
(6) |
Dec
(17) |
2006 |
Jan
(10) |
Feb
(8) |
Mar
(5) |
Apr
(5) |
May
(6) |
Jun
(8) |
Jul
(8) |
Aug
(13) |
Sep
(2) |
Oct
(1) |
Nov
(9) |
Dec
(6) |
2007 |
Jan
(3) |
Feb
(4) |
Mar
(12) |
Apr
(2) |
May
(6) |
Jun
|
Jul
(22) |
Aug
|
Sep
(9) |
Oct
(13) |
Nov
|
Dec
|
2008 |
Jan
(1) |
Feb
(6) |
Mar
(2) |
Apr
(4) |
May
(15) |
Jun
(28) |
Jul
(8) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
(5) |
Feb
(5) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(2) |
Apr
(7) |
May
(4) |
Jun
(2) |
Jul
(5) |
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
2011 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(4) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Wolfram K. <w_...@rz...> - 2004-05-04 13:28:16
|
You wrote: >I dont think it is the model that is at question, I have exported and = created it in different formats.=20 Ok. >I was hoping if someone has had a similiar experience. Is there some = possible way that this could happen? =20 Not really. How do you know it is an inside/outside thing and not for example a ZBuffer problem? Is your near clipping plane set to zero maybe? >Changing the order at which I add different ssgBranchs to the scene root= for example? No. >It is bizzare. Yes. Bye bye, Wolfram. |
From: David L. <Dav...@no...> - 2004-05-04 13:03:48
|
On 5/4/04 at 6:23 AM Clay, Bruce wrote: >Brian: > I have had problems using the streams for debugging. Things get >buffered so you may not see what you expect. Try using fprintf(stderr, >... Instead or put a break point in the callback. Also, if you are >doing this with C++ you may have to declare the callback method as a >static method. > Putting << flush or << endl after stream debugging output to find the site of a crash should cure the buffering problems. As you say, output can be misleading without it. Cheers - Dave This message has been scanned but we cannot guarantee that it and any attachments are free from viruses or other damaging content: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. |
From: Clay, B. <bc...@ba...> - 2004-05-04 12:24:14
|
Brian: I have had problems using the streams for debugging. Things get buffered so you may not see what you expect. Try using fprintf(stderr, ... Instead or put a break point in the callback. Also, if you are doing this with C++ you may have to declare the callback method as a static method. Bruce -----Original Message----- From: pli...@li... [mailto:pli...@li...] On Behalf Of Brian Smith Sent: Tuesday, May 04, 2004 12:24 AM To: pli...@li... Subject: [Plib-users] ComboBox Problems I am having a little problem with all of the selection objects (puaComboBox,=20 selectbox, buttonBox). I have posted this before but no one replied to me,=20 hoping maybe you can help. I declare the pointer in the header file. Here=20 is where I set the combo box and start to use it: char *listOne[] =3D { "First Entry", "Second Entry", "Third Entry", "Fourth=20 Entry", "Fifth Entry", "Sixth Entry", NULL } ; choiceOne =3D new puaComboBox(30, 400, 230, 425, listOne, FALSE); choiceOne->setCallback(ChoiceOneCallback); I have all of the necessary callbacks for keyboard and mouse. You can click=20 on the combobox and the menu drops down, however you can't select anything. =20 If you use the up arrow on the keyboard (or down whichever) the program will=20 crash. However I have displayed that the combo box does have six items in=20 it. I think I have narrowed it down to the callback function for the=20 combobox, it never enters in there when something is selected: void MainChoiceOneCallback(puObject *) { cout<<"HELLLOOOOOOOOO"; } this will display nothing. I have also tried changing the list for the=20 combobox within the callback and it doesn't change the display at all. So=20 my question is why is it not entering the callback, is it a bug with=20 pui/puAux or is it my doing?? Thank you in advance. -Brian _________________________________________________________________ Getting married? Find tips, tools and the latest trends at MSN Life Events.=20 http://lifeevents.msn.com/category.aspx?cid=3Dmarried ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick _______________________________________________ plib-users mailing list pli...@li... https://lists.sourceforge.net/lists/listinfo/plib-users |
From: Simon <sim...@ho...> - 2004-05-04 10:31:17
|
Hi, ok I think I'm beginning to get my head around ssg. I've read = through all the documentation several times now. What I want to do is add a few functions and some variables to an object. I've seen a few ways that = might make this possible and I was hoping someone could point me in the right direction. =20 Write a new class that extends an entity Write a new class that extends a leaf node Write a new class that extends a branch node (don't think it's this one) Using function call backs on standard versions of the above that call my = new functions Store my variables in the standard versions using the user data section =20 The docs say: "It is presumed that applications will add new kinds of leaves, = branches, states and textures to customise SSG to their needs." =20 You see this is where I get confused. Leaves sound like the best choice = to add the extra functionality to each node, so I thought I should make a = new class based on ssgLeaf. But then I read up on adding user data. I understand I can pump lots of my own variables into this and that along = with pre/post draw call backs I can also call my own functions on an entity = that uses these variables. The problem I see with extending leaves is that = in my demo program I don't actually specify "create a leaf of this type". I = just create an ssgRoot and add some ssgEntities to it. I'm using ssgLoad3ds = to generate the model data for each entity so I'm not sure if this creates = the leaves internally. =20 Thank you now and I'll say thank you later -Simon =20 =20 =20 |
From: Munn, C. <Chr...@ds...> - 2004-05-04 04:41:56
|
I dont think it is the model that is at question, I have exported and = created it in different formats.=20 Anyway it sometimes works depending what else is in the scene. Sometime = the cube goes solid as I revolve around which brings other elements = into the scene. I was hoping if someone has had a similiar experience. Is there some = possible way that this could happen? =20 Changing the order at which I add different ssgBranchs to the scene = root for example? It is bizzare. -----Original Message----- From: Wolfram Kuss [mailto:w_...@rz...] Sent: Monday, 3 May 2004 3:51 AM To: pli...@li... Subject: Re: [Plib-users] One sided models switching to two sided Very strange. If you want, email me the 3D file and I will have a look. Bye bye, Wolfram. -----Original Message----- From: Munn, Chris [mailto:Chr...@ds...] Sent: Friday, 30 April 2004 4:49 PM To: 'pli...@li...' Subject: [Plib-users] One sided models switching to two sided Hello, I am experiencing a wierd problem where I load a 3d model of a 1 sided = cube with its normals pointed inward. I.E I can see inside the cube = from the outside. Somehow depending on where my camera is placed the = cube becomes twosided (or flipped normals) so I can not see inside it. = I have a class derived from ssgTransform that the has the cube = ssgTransform added as a kid. Am I doing something wrong? ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle = 10g.=20 Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick _______________________________________________ plib-users mailing list pli...@li... https://lists.sourceforge.net/lists/listinfo/plib-users |
From: Brian S. <sch...@ho...> - 2004-05-04 04:24:39
|
I am having a little problem with all of the selection objects (puaComboBox, selectbox, buttonBox). I have posted this before but no one replied to me, hoping maybe you can help. I declare the pointer in the header file. Here is where I set the combo box and start to use it: char *listOne[] = { "First Entry", "Second Entry", "Third Entry", "Fourth Entry", "Fifth Entry", "Sixth Entry", NULL } ; choiceOne = new puaComboBox(30, 400, 230, 425, listOne, FALSE); choiceOne->setCallback(ChoiceOneCallback); I have all of the necessary callbacks for keyboard and mouse. You can click on the combobox and the menu drops down, however you can't select anything. If you use the up arrow on the keyboard (or down whichever) the program will crash. However I have displayed that the combo box does have six items in it. I think I have narrowed it down to the callback function for the combobox, it never enters in there when something is selected: void MainChoiceOneCallback(puObject *) { cout<<"HELLLOOOOOOOOO"; } this will display nothing. I have also tried changing the list for the combobox within the callback and it doesn't change the display at all. So my question is why is it not entering the callback, is it a bug with pui/puAux or is it my doing?? Thank you in advance. -Brian _________________________________________________________________ Getting married? Find tips, tools and the latest trends at MSN Life Events. http://lifeevents.msn.com/category.aspx?cid=married |
From: Wolfram K. <w_...@rz...> - 2004-05-02 18:19:16
|
Very strange. If you want, email me the 3D file and I will have a look. Bye bye, Wolfram. |
From: Daniel T K. <dan...@dy...> - 2004-04-30 13:23:13
|
I was trying to get the PLIB Examples 1.8.x to compile under Mac OS X 10.3.x and it failed. Has anyone been able to get them to compile under this operating system? If they have, then I'll keep trying. If not, then I'll send in the error messages,etc. to see what is going wrong. Danny |
From: Munn, C. <Chr...@ds...> - 2004-04-30 07:20:55
|
Hello, I am experiencing a wierd problem where I load a 3d model of a 1 sided cube with its normals pointed inward. I.E I can see inside the cube from the outside. Somehow depending on where my camera is placed the cube becomes twosided (or flipped normals) so I can not see inside it. I have a class derived from ssgTransform that the has the cube ssgTransform added as a kid. Am I doing something wrong? ssgTransform * chamber; ssgTransform * cube ; chamber.addKid(cube); root.addKid(chamber); |
From: Paolo L. <p.l...@ci...> - 2004-04-27 11:37:38
|
Michael, Should the search function not find any node could be due to the 'flatten' graph reorganization, if you apply it. Flatten eliminates unnecessary ssgTransforms (those with identity xform) - so incidentally deleting those nodes which actually hold the object name (loaders normally setName() just to ssgTransform nodes). I never went down to its source code, so it could be that ssgTransform's with a name set are 'saved' in the flatten op. Greetings - Paolo > -----Messaggio originale----- > Da: pli...@li...=20 > [mailto:pli...@li...] Per conto di=20 > Michael Wessels > Inviato: marted=EC 27 aprile 2004 11.44 > A: pli...@li... > Oggetto: Re: [Plib-users] Identifying objects after loading=20 > an AC3D- modell >=20 >=20 > Hi Paolo, > I will try it. >=20 > Thanks >=20 > Michael > ----- Original Message -----=20 > From: "Paolo Leoncini" <p.l...@ci...> > To: <pli...@li...> > Sent: Tuesday, April 27, 2004 9:44 AM > Subject: R: [Plib-users] Identifying objects after loading an=20 > AC3D- modell >=20 >=20 > Michael, >=20 > You're welcome - ftp://ftp.cira.it/download/lepa069/envmap.cxx >=20 > Hope everything is clear with this little comment support -=20 > this is how I manage the env mapping property into SSG and=20 > the corresponding search-then-setup functions. >=20 > Greetings - >=20 > Paolo >=20 >=20 > > -----Messaggio originale----- > > Da: pli...@li... > > [mailto:pli...@li...] Per conto=20 > di Michael=20 > > Wessels > > Inviato: luned=EC 26 aprile 2004 18.38 > > A: pli...@li... > > Oggetto: Re: [Plib-users] Identifying objects after loading=20 > an AC3D-=20 > > modell > > > > > > Hi Paolo, > > I understand what you mean and I agree. I have tried to=20 > walk through=20 > > the tree but not successfull. Can you give me some lines of=20 > C/C++code=20 > > how to do it ? Best regards > > > > Michael > > > > ----- Original Message ----- > > From: "Paolo Leoncini" <p.l...@ci...> > > To: <pli...@li...> > > Sent: Monday, April 26, 2004 9:59 AM > > Subject: R: [Plib-users] Identifying objects after loading an > > AC3D- modell > > > > > > Michael, > > > > Is the problem setting custom properties for objects/materials? > > > > The approach based on inline comments doesn't meet my favour since > > a) it works only for ascii-text file (3D) formats such as AC3D, > > b) needs of manual editing as you update the file (risk to=20 > loose such=20 > > addenda or to be enabled to do it only in its final version). > > > > I'm in favour of this alternative solution: > > > > A) manually write a simple text properties file - I use kinda .ini > > format: > > > > [property] > > Object-name Params > > ... > > [property] > > Material-name Params > > ... > > > > B) learn to parse your format, and, after having loaded the=20 > 3D data,=20 > > walk the graph by first identifying nodes by name (either=20 > objects or=20 > > materials, the getName() method works on both, and on=20 > non-states you=20 > > have also the getByName() > > utility) - all 3D formats allow to identifiy objs/mats by a textual=20 > > name - then setting node properties depending on the=20 > directive in the=20 > > file. > > > > I use properties like envmap, mirror, no-lit (disable=20 > lighting), etc,=20 > > some acting on leafs and others on states. > > > > This approach is not so heavy in the implementation, keeps=20 > 3D data and=20 > > custom properties separate, and works for all 3D data formats. > > > > Greetings - > > > > Paolo > > > > > > > -----Messaggio originale----- > > > Da: pli...@li... > > > [mailto:pli...@li...] Per conto > > di Michael > > > Wessels > > > Inviato: venerd=EC 23 aprile 2004 18.47 > > > A: pli...@li... > > > Oggetto: Re: [Plib-users] Identifying objects after loading > > an AC3D- > > > modell > > > > > > > > > Dear Steve, > > > I have implemented what you said. > > > But when I debug the application the code never jumps in > > the function > > > ssgBranch *process_userdata ( char *data ) . My ac-file looks=20 > > > folowing:. > > > > > > AC3Db > > > MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0=20 > 0 spec 0.5=20 > > > 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat3" rgb 1 0 0 amb > > 0.2 0.2 0.2 > > > emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL=20 > "ac3dmat7" rgb=20 > > > 0.270588 0.52549 0.454902 amb 0.2 0.2 0.2 emis 0 0 0 =20 > spec 0.5 0.5=20 > > > 0.5 shi 10 trans 0 MATERIAL "ac3dmat9" rgb 0 0 1 amb 0.2 > > 0.2 0.2 > > > emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL=20 > "ac3dmat13" rgb=20 > > > 0.533333 0.533333 0.533333 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5=20 > > > 0.5 0.5 shi 10 trans 0 OBJECT world kids 2 OBJECT group name=20 > > > "Race-Course" loc 0.560112 0.0001 0.361112 kids 4 OBJECT=20 > poly name=20 > > > "poly" loc -0.240913 0 -0.282012 texture "ASSPHALT.bmp"=20 > texrep 10 10=20 > > > numvert 10 -0.1712 0 -0.1475 -0.0751 0 -0.1577 0.0686 0 -0.1675=20 > > > 0.2239 0 -0.1789 0.3284 0 -0.1871 0.3219 0 -0.2051 0.1242=20 > 0 -0.1854=20 > > > -0.0899 0 -0.1724 -0.1744 0 -0.1613 -0.1744 0 -0.1613 numsurf 10 > > > ............... ................ > > > > > > I attach the .ac-file to this mail. > > > My intention is to seperate for example the > > > > > > OBJECT group > > > name "Race-Course" > > > > > > as a single object from the rest. > > > What can I do ? > > > > > > Best regards > > > > > > ----- Original Message ----- > > > From: "Steve Baker" <sjb...@ai...> > > > To: <pli...@li...> > > > Sent: Friday, March 26, 2004 3:35 AM > > > Subject: Re: [Plib-users] Identifying objects after=20 > loading an AC3D-=20 > > > modell > > > > > > > > > > Michael Wessels wrote: > > > > > > > > > in my '.ac' file I have the comment field "Tribune1". How > > > can I tell > > > > > the PLIB loaders to call a callback function in the > > > application when > > > > > they > > > find > > > > > this comment field ? > > > > > > > > Write a function like this: > > > > > > > > ssgBranch *process_userdata ( char *data ) > > > > { > > > > if ( data =3D=3D NULL || data [ 0 ] =3D=3D '\0' ) return = NULL ; > > > > > > > > if ( strncmp ( "Tribune1", data, strlen ( "Tribune1" > > ) ) =3D=3D 0 ) > > > > { > > > > ssgBranch *b =3D new ssgBranch () ; /* ...or whatever > > > you want > > > > this > > > node to be */ > > > > /* whatever you need to do here */ > > > > return b ; > > > > } > > > > > > > > return NULL ; > > > > } > > > > > > > > > > > > Sometime after ssgInit() but before you load your model: > > > > > > > > ssgLoaderOptions *loader_opts =3D new ssgLoaderOptions () ; > > > > loader_opts -> setCreateBranchCallback ( process_userdata ) ; > > > > /* You may wish to set other loader options here */ > > > > ssgSetCurrentOptions ( loader_opts ) ; > > > > > > > > ...then just load your model in the usual way and whenever > > > SSG needs > > > > to create a branch node, it'll call your 'process_userdata' > > > > function with the comment as the parameter. If this is > > a 'special' > > > > node, then you create the node and return it as the result. > > > If it's > > > > not special then just return NULL and the loader will do > > something > > > > appropriate. > > > > > > > > ---------------------------- Steve Baker=20 > ------------------------- > > > > HomeEmail: <sjb...@ai...> WorkEmail:=20 > <sj...@li...> > > > > HomePage : http://www.sjbaker.org > > > > Projects : http://plib.sf.net http://tuxaqfh.sf.net > > > > http://tuxkart.sf.net http://prettypoly.sf.net > > > -----BEGIN > > > > GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P---=20 > L++++$ E--- > > > > W+++ N o+ K? w--- !O M- > > > > V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ > > h--(-) r+++ > > > > y++++ -----END GEEK CODE BLOCK----- > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.Net email is sponsored by: IBM Linux Tutorials=20 > Free Linux=20 > > > > tutorial presented by Daniel Robbins, President > > > and CEO of > > > > GenToo technologies. Learn everything from fundamentals=20 > to system > > > > > > > > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > > > _______________________________________________ > > > > plib-users mailing list > > > > pli...@li...=20 > > > > https://lists.sourceforge.net/lists/listinfo/plib-users > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: The Robotic Monkeys at=20 > ThinkGeek=20 > > > For a limited time only, get FREE Ground shipping on all > > orders of $35 > > > or more. Hurry up and shop folks, this offer expires April 30th!=20 > > > http://www.thinkgeek.com/freeshipping/?cpg=3D> 12297 > > > > > > _______________________________________________ > > > > > > plib-users mailing list > > > pli...@li...=20 > > > https://lists.sourceforge.net/lists/listinfo/p> lib-users > > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek=20 > > For a limited time only, get FREE Ground shipping on all=20 > orders of $35=20 > > or more. Hurry up and shop folks, this offer expires April 30th! > > http://www.thinkgeek.com/freeshipping/?cpg=12297 > > > > _______________________________________________ > > plib-users mailing list > > pli...@li...=20 > > https://lists.sourceforge.net/lists/listinfo/p> lib-users > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek=20 > > For a limited time only, get FREE Ground shipping on all=20 > orders of $35=20 > > or more. Hurry up and shop folks, this offer expires April 30th! > > http://www.thinkgeek.com/freeshipping/?cpg=12297 > > > > _______________________________________________ > > plib-users mailing list > > pli...@li...=20 > > https://lists.sourceforge.net/lists/listinfo/p> lib-users > > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at=20 > ThinkGeek For a limited time only, get FREE Ground shipping=20 > on all orders of $35 or more. Hurry up and shop folks, this=20 > offer expires April 30th!=20 > http://www.thinkgeek.com/freeshipping/?cpg=12297 >=20 > _______________________________________________ > plib-users mailing list > pli...@li...=20 > https://lists.sourceforge.net/lists/listinfo/p> lib-users >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at=20 > ThinkGeek For a limited time only, get FREE Ground shipping=20 > on all orders of $35 or more. Hurry up and shop folks, this=20 > offer expires April 30th!=20 > http://www.thinkgeek.com/freeshipping/?cpg=12297 >=20 > _______________________________________________ > plib-users mailing list > pli...@li...=20 > https://lists.sourceforge.net/lists/listinfo/p> lib-users >=20 |
From: Michael W. <mic...@ti...> - 2004-04-27 10:44:17
|
Hi Paolo, I will try it. Thanks Michael ----- Original Message -----=20 From: "Paolo Leoncini" <p.l...@ci...> To: <pli...@li...> Sent: Tuesday, April 27, 2004 9:44 AM Subject: R: [Plib-users] Identifying objects after loading an AC3D- model= l Michael, You're welcome - ftp://ftp.cira.it/download/lepa069/envmap.cxx Hope everything is clear with this little comment support - this is how I manage the env mapping property into SSG and the corresponding search-then-setup functions. Greetings - Paolo > -----Messaggio originale----- > Da: pli...@li... > [mailto:pli...@li...] Per conto di > Michael Wessels > Inviato: luned=EC 26 aprile 2004 18.38 > A: pli...@li... > Oggetto: Re: [Plib-users] Identifying objects after loading > an AC3D- modell > > > Hi Paolo, > I understand what you mean and I agree. I have tried to walk > through the tree but not successfull. Can you give me some > lines of C/C++code how to do it ? Best regards > > Michael > > ----- Original Message -----=20 > From: "Paolo Leoncini" <p.l...@ci...> > To: <pli...@li...> > Sent: Monday, April 26, 2004 9:59 AM > Subject: R: [Plib-users] Identifying objects after loading an > AC3D- modell > > > Michael, > > Is the problem setting custom properties for objects/materials? > > The approach based on inline comments doesn't meet my favour since > a) it works only for ascii-text file (3D) formats such as AC3D, > b) needs of manual editing as you update the file (risk to > loose such addenda or to be enabled to do it only in its > final version). > > I'm in favour of this alternative solution: > > A) manually write a simple text properties file - I use kinda .ini > format: > > [property] > Object-name Params > ... > [property] > Material-name Params > ... > > B) learn to parse your format, and, after having loaded the > 3D data, walk the graph by first identifying nodes by name > (either objects or materials, the getName() method works on > both, and on non-states you have also the getByName() > utility) - all 3D formats allow to identifiy objs/mats by a > textual name - then setting node properties depending on the > directive in the file. > > I use properties like envmap, mirror, no-lit (disable > lighting), etc, some acting on leafs and others on states. > > This approach is not so heavy in the implementation, keeps 3D > data and custom properties separate, and works for all 3D > data formats. > > Greetings - > > Paolo > > > > -----Messaggio originale----- > > Da: pli...@li... > > [mailto:pli...@li...] Per conto > di Michael > > Wessels > > Inviato: venerd=EC 23 aprile 2004 18.47 > > A: pli...@li... > > Oggetto: Re: [Plib-users] Identifying objects after loading > an AC3D- > > modell > > > > > > Dear Steve, > > I have implemented what you said. > > But when I debug the application the code never jumps in > the function > > ssgBranch *process_userdata ( char *data ) . My ac-file looks > > folowing:. > > > > AC3Db > > MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 > > 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat3" rgb 1 0 0 amb > 0.2 0.2 0.2 > > emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat7" rgb > > 0.270588 0.52549 0.454902 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 > > 0.5 shi 10 trans 0 MATERIAL "ac3dmat9" rgb 0 0 1 amb 0.2 > 0.2 0.2 > > emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat13" rgb > > 0.533333 0.533333 0.533333 amb 0.2 0.2 0.2 emis 0 0 0 spec > > 0.5 0.5 0.5 shi 10 trans 0 OBJECT world kids 2 OBJECT group > > name "Race-Course" loc 0.560112 0.0001 0.361112 kids 4 OBJECT > > poly name "poly" loc -0.240913 0 -0.282012 texture > > "ASSPHALT.bmp" texrep 10 10 numvert 10 -0.1712 0 -0.1475 > > -0.0751 0 -0.1577 0.0686 0 -0.1675 0.2239 0 -0.1789 0.3284 0 > > -0.1871 0.3219 0 -0.2051 0.1242 0 -0.1854 -0.0899 0 -0.1724 > > -0.1744 0 -0.1613 -0.1744 0 -0.1613 numsurf 10 > > ............... ................ > > > > I attach the .ac-file to this mail. > > My intention is to seperate for example the > > > > OBJECT group > > name "Race-Course" > > > > as a single object from the rest. > > What can I do ? > > > > Best regards > > > > ----- Original Message ----- > > From: "Steve Baker" <sjb...@ai...> > > To: <pli...@li...> > > Sent: Friday, March 26, 2004 3:35 AM > > Subject: Re: [Plib-users] Identifying objects after loading > > an AC3D- modell > > > > > > > Michael Wessels wrote: > > > > > > > in my '.ac' file I have the comment field "Tribune1". How > > can I tell > > > > the PLIB loaders to call a callback function in the > > application when > > > > they > > find > > > > this comment field ? > > > > > > Write a function like this: > > > > > > ssgBranch *process_userdata ( char *data ) > > > { > > > if ( data =3D=3D NULL || data [ 0 ] =3D=3D '\0' ) return NULL = ; > > > > > > if ( strncmp ( "Tribune1", data, strlen ( "Tribune1" > ) ) =3D=3D 0 ) > > > { > > > ssgBranch *b =3D new ssgBranch () ; /* ...or whatever > > you want > > > this > > node to be */ > > > /* whatever you need to do here */ > > > return b ; > > > } > > > > > > return NULL ; > > > } > > > > > > > > > Sometime after ssgInit() but before you load your model: > > > > > > ssgLoaderOptions *loader_opts =3D new ssgLoaderOptions () ; > > > loader_opts -> setCreateBranchCallback ( process_userdata ) ; > > > /* You may wish to set other loader options here */ > > > ssgSetCurrentOptions ( loader_opts ) ; > > > > > > ...then just load your model in the usual way and whenever > > SSG needs > > > to create a branch node, it'll call your 'process_userdata' > > > function with the comment as the parameter. If this is > a 'special' > > > node, then you create the node and return it as the result. > > If it's > > > not special then just return NULL and the loader will do > something > > > appropriate. > > > > > > ---------------------------- Steve Baker ------------------------- > > > HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> > > > HomePage : http://www.sjbaker.org > > > Projects : http://plib.sf.net http://tuxaqfh.sf.net > > > http://tuxkart.sf.net http://prettypoly.sf.net > > -----BEGIN > > > GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- > > > W+++ N o+ K? w--- !O M- > > > V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ > h--(-) r+++ > > > y++++ -----END GEEK CODE BLOCK----- > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials > > > Free Linux tutorial presented by Daniel Robbins, President > > and CEO of > > > GenToo technologies. Learn everything from fundamentals to system > > > > > > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dc= lick > > > _______________________________________________ > > > plib-users mailing list > > > pli...@li... > > > https://lists.sourceforge.net/lists/listinfo/plib-users > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek > > For a limited time only, get FREE Ground shipping on all > orders of $35 > > or more. Hurry up and shop folks, this offer expires April 30th! > > http://www.thinkgeek.com/freeshipping/?cpg=3D> 12297 > > > > _______________________________________________ > > > > plib-users mailing list > > pli...@li... > > https://lists.sourceforge.net/lists/listinfo/p> lib-users > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at > ThinkGeek For a limited time only, get FREE Ground shipping > on all orders of $35 or more. Hurry up and shop folks, this > offer expires April 30th! > http://www.thinkgeek.com/freeshipping/?cpg=12297 > > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/p> lib-users > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at > ThinkGeek For a limited time only, get FREE Ground shipping > on all orders of $35 or more. Hurry up and shop folks, this > offer expires April 30th! > http://www.thinkgeek.com/freeshipping/?cpg=12297 > > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/p> lib-users > ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ plib-users mailing list pli...@li... https://lists.sourceforge.net/lists/listinfo/plib-users |
From: Paolo L. <p.l...@ci...> - 2004-04-27 07:45:09
|
Michael, You're welcome - ftp://ftp.cira.it/download/lepa069/envmap.cxx Hope everything is clear with this little comment support - this is how I manage the env mapping property into SSG and the corresponding search-then-setup functions. Greetings - Paolo > -----Messaggio originale----- > Da: pli...@li...=20 > [mailto:pli...@li...] Per conto di=20 > Michael Wessels > Inviato: luned=EC 26 aprile 2004 18.38 > A: pli...@li... > Oggetto: Re: [Plib-users] Identifying objects after loading=20 > an AC3D- modell >=20 >=20 > Hi Paolo, > I understand what you mean and I agree. I have tried to walk=20 > through the tree but not successfull. Can you give me some=20 > lines of C/C++code how to do it ? Best regards >=20 > Michael >=20 > ----- Original Message -----=20 > From: "Paolo Leoncini" <p.l...@ci...> > To: <pli...@li...> > Sent: Monday, April 26, 2004 9:59 AM > Subject: R: [Plib-users] Identifying objects after loading an=20 > AC3D- modell >=20 >=20 > Michael, >=20 > Is the problem setting custom properties for objects/materials? >=20 > The approach based on inline comments doesn't meet my favour since > a) it works only for ascii-text file (3D) formats such as AC3D, > b) needs of manual editing as you update the file (risk to=20 > loose such addenda or to be enabled to do it only in its=20 > final version). >=20 > I'm in favour of this alternative solution: >=20 > A) manually write a simple text properties file - I use kinda .ini > format: >=20 > [property] > Object-name Params > ... > [property] > Material-name Params > ... >=20 > B) learn to parse your format, and, after having loaded the=20 > 3D data, walk the graph by first identifying nodes by name=20 > (either objects or materials, the getName() method works on=20 > both, and on non-states you have also the getByName()=20 > utility) - all 3D formats allow to identifiy objs/mats by a=20 > textual name - then setting node properties depending on the=20 > directive in the file. >=20 > I use properties like envmap, mirror, no-lit (disable=20 > lighting), etc, some acting on leafs and others on states. >=20 > This approach is not so heavy in the implementation, keeps 3D=20 > data and custom properties separate, and works for all 3D=20 > data formats. >=20 > Greetings - >=20 > Paolo >=20 >=20 > > -----Messaggio originale----- > > Da: pli...@li... > > [mailto:pli...@li...] Per conto=20 > di Michael=20 > > Wessels > > Inviato: venerd=EC 23 aprile 2004 18.47 > > A: pli...@li... > > Oggetto: Re: [Plib-users] Identifying objects after loading=20 > an AC3D-=20 > > modell > > > > > > Dear Steve, > > I have implemented what you said. > > But when I debug the application the code never jumps in=20 > the function=20 > > ssgBranch *process_userdata ( char *data ) . My ac-file looks=20 > > folowing:. > > > > AC3Db > > MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5=20 > > 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat3" rgb 1 0 0 amb=20 > 0.2 0.2 0.2 =20 > > emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat7" rgb=20 > > 0.270588 0.52549 0.454902 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5=20 > > 0.5 shi 10 trans 0 MATERIAL "ac3dmat9" rgb 0 0 1 amb 0.2=20 > 0.2 0.2 =20 > > emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat13" rgb > > 0.533333 0.533333 0.533333 amb 0.2 0.2 0.2 emis 0 0 0 spec > > 0.5 0.5 0.5 shi 10 trans 0 OBJECT world kids 2 OBJECT group > > name "Race-Course" loc 0.560112 0.0001 0.361112 kids 4 OBJECT > > poly name "poly" loc -0.240913 0 -0.282012 texture > > "ASSPHALT.bmp" texrep 10 10 numvert 10 -0.1712 0 -0.1475 > > -0.0751 0 -0.1577 0.0686 0 -0.1675 0.2239 0 -0.1789 0.3284 0 > > -0.1871 0.3219 0 -0.2051 0.1242 0 -0.1854 -0.0899 0 -0.1724 > > -0.1744 0 -0.1613 -0.1744 0 -0.1613 numsurf 10 > > ............... ................ > > > > I attach the .ac-file to this mail. > > My intention is to seperate for example the > > > > OBJECT group > > name "Race-Course" > > > > as a single object from the rest. > > What can I do ? > > > > Best regards > > > > ----- Original Message ----- > > From: "Steve Baker" <sjb...@ai...> > > To: <pli...@li...> > > Sent: Friday, March 26, 2004 3:35 AM > > Subject: Re: [Plib-users] Identifying objects after loading > > an AC3D- modell > > > > > > > Michael Wessels wrote: > > > > > > > in my '.ac' file I have the comment field "Tribune1". How > > can I tell > > > > the PLIB loaders to call a callback function in the > > application when > > > > they > > find > > > > this comment field ? > > > > > > Write a function like this: > > > > > > ssgBranch *process_userdata ( char *data ) > > > { > > > if ( data =3D=3D NULL || data [ 0 ] =3D=3D '\0' ) return NULL = ; > > > > > > if ( strncmp ( "Tribune1", data, strlen ( "Tribune1"=20 > ) ) =3D=3D 0 ) > > > { > > > ssgBranch *b =3D new ssgBranch () ; /* ...or whatever > > you want > > > this > > node to be */ > > > /* whatever you need to do here */ > > > return b ; > > > } > > > > > > return NULL ; > > > } > > > > > > > > > Sometime after ssgInit() but before you load your model: > > > > > > ssgLoaderOptions *loader_opts =3D new ssgLoaderOptions () ; > > > loader_opts -> setCreateBranchCallback ( process_userdata ) ; > > > /* You may wish to set other loader options here */ > > > ssgSetCurrentOptions ( loader_opts ) ; > > > > > > ...then just load your model in the usual way and whenever > > SSG needs > > > to create a branch node, it'll call your 'process_userdata' > > > function with the comment as the parameter. If this is=20 > a 'special' > > > node, then you create the node and return it as the result. > > If it's > > > not special then just return NULL and the loader will do=20 > something=20 > > > appropriate. > > > > > > ---------------------------- Steve Baker ------------------------- > > > HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> > > > HomePage : http://www.sjbaker.org > > > Projects : http://plib.sf.net http://tuxaqfh.sf.net > > > http://tuxkart.sf.net http://prettypoly.sf.net > > -----BEGIN > > > GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- > > > W+++ N o+ K? w--- !O M- > > > V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++=20 > h--(-) r+++ > > > y++++ -----END GEEK CODE BLOCK----- > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: IBM Linux Tutorials > > > Free Linux tutorial presented by Daniel Robbins, President > > and CEO of > > > GenToo technologies. Learn everything from fundamentals to system > > > > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > > _______________________________________________ > > > plib-users mailing list > > > pli...@li...=20 > > > https://lists.sourceforge.net/lists/listinfo/plib-users > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek=20 > > For a limited time only, get FREE Ground shipping on all=20 > orders of $35=20 > > or more. Hurry up and shop folks, this offer expires April 30th! > > http://www.thinkgeek.com/freeshipping/?cpg=3D> 12297 > > > > _______________________________________________ > > > > plib-users mailing list > > pli...@li...=20 > > https://lists.sourceforge.net/lists/listinfo/p> lib-users > > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at=20 > ThinkGeek For a limited time only, get FREE Ground shipping=20 > on all orders of $35 or more. Hurry up and shop folks, this=20 > offer expires April 30th!=20 > http://www.thinkgeek.com/freeshipping/?cpg=12297 >=20 > _______________________________________________ > plib-users mailing list > pli...@li...=20 > https://lists.sourceforge.net/lists/listinfo/p> lib-users >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at=20 > ThinkGeek For a limited time only, get FREE Ground shipping=20 > on all orders of $35 or more. Hurry up and shop folks, this=20 > offer expires April 30th!=20 > http://www.thinkgeek.com/freeshipping/?cpg=12297 >=20 > _______________________________________________ > plib-users mailing list > pli...@li...=20 > https://lists.sourceforge.net/lists/listinfo/p> lib-users >=20 |
From: Michael W. <mic...@ti...> - 2004-04-26 17:38:44
|
Hi Paolo, I understand what you mean and I agree. I have tried to walk through the tree but not successfull. Can you give me some lines of C/C++code how to do it ? Best regards Michael ----- Original Message -----=20 From: "Paolo Leoncini" <p.l...@ci...> To: <pli...@li...> Sent: Monday, April 26, 2004 9:59 AM Subject: R: [Plib-users] Identifying objects after loading an AC3D- model= l Michael, Is the problem setting custom properties for objects/materials? The approach based on inline comments doesn't meet my favour since a) it works only for ascii-text file (3D) formats such as AC3D, b) needs of manual editing as you update the file (risk to loose such addenda or to be enabled to do it only in its final version). I'm in favour of this alternative solution: A) manually write a simple text properties file - I use kinda .ini format: [property] Object-name Params ... [property] Material-name Params ... B) learn to parse your format, and, after having loaded the 3D data, walk the graph by first identifying nodes by name (either objects or materials, the getName() method works on both, and on non-states you have also the getByName() utility) - all 3D formats allow to identifiy objs/mats by a textual name - then setting node properties depending on the directive in the file. I use properties like envmap, mirror, no-lit (disable lighting), etc, some acting on leafs and others on states. This approach is not so heavy in the implementation, keeps 3D data and custom properties separate, and works for all 3D data formats. Greetings - Paolo > -----Messaggio originale----- > Da: pli...@li... > [mailto:pli...@li...] Per conto di > Michael Wessels > Inviato: venerd=EC 23 aprile 2004 18.47 > A: pli...@li... > Oggetto: Re: [Plib-users] Identifying objects after loading > an AC3D- modell > > > Dear Steve, > I have implemented what you said. > But when I debug the application the code never jumps in the > function ssgBranch *process_userdata ( char *data ) . My > ac-file looks folowing:. > > AC3Db > MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 > spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat3" rgb 1 0 > 0 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 > trans 0 MATERIAL "ac3dmat7" rgb 0.270588 0.52549 0.454902 > amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans > 0 MATERIAL "ac3dmat9" rgb 0 0 1 amb 0.2 0.2 0.2 emis 0 0 0 > spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat13" rgb > 0.533333 0.533333 0.533333 amb 0.2 0.2 0.2 emis 0 0 0 spec > 0.5 0.5 0.5 shi 10 trans 0 OBJECT world kids 2 OBJECT group > name "Race-Course" loc 0.560112 0.0001 0.361112 kids 4 OBJECT > poly name "poly" loc -0.240913 0 -0.282012 texture > "ASSPHALT.bmp" texrep 10 10 numvert 10 -0.1712 0 -0.1475 > -0.0751 0 -0.1577 0.0686 0 -0.1675 0.2239 0 -0.1789 0.3284 0 > -0.1871 0.3219 0 -0.2051 0.1242 0 -0.1854 -0.0899 0 -0.1724 > -0.1744 0 -0.1613 -0.1744 0 -0.1613 numsurf 10 > ............... ................ > > I attach the .ac-file to this mail. > My intention is to seperate for example the > > OBJECT group > name "Race-Course" > > as a single object from the rest. > What can I do ? > > Best regards > > ----- Original Message -----=20 > From: "Steve Baker" <sjb...@ai...> > To: <pli...@li...> > Sent: Friday, March 26, 2004 3:35 AM > Subject: Re: [Plib-users] Identifying objects after loading > an AC3D- modell > > > > Michael Wessels wrote: > > > > > in my '.ac' file I have the comment field "Tribune1". How > can I tell > > > the PLIB loaders to call a callback function in the > application when > > > they > find > > > this comment field ? > > > > Write a function like this: > > > > ssgBranch *process_userdata ( char *data ) > > { > > if ( data =3D=3D NULL || data [ 0 ] =3D=3D '\0' ) return NULL ; > > > > if ( strncmp ( "Tribune1", data, strlen ( "Tribune1" ) ) =3D=3D = 0 ) > > { > > ssgBranch *b =3D new ssgBranch () ; /* ...or whatever > you want > > this > node to be */ > > /* whatever you need to do here */ > > return b ; > > } > > > > return NULL ; > > } > > > > > > Sometime after ssgInit() but before you load your model: > > > > ssgLoaderOptions *loader_opts =3D new ssgLoaderOptions () ; > > loader_opts -> setCreateBranchCallback ( process_userdata ) ; > > /* You may wish to set other loader options here */ > > ssgSetCurrentOptions ( loader_opts ) ; > > > > ...then just load your model in the usual way and whenever > SSG needs > > to create a branch node, it'll call your 'process_userdata' > > function with the comment as the parameter. If this is a 'special' > > node, then you create the node and return it as the result. > If it's > > not special then just return NULL and the loader will do something > > appropriate. > > > > ---------------------------- Steve Baker ------------------------- > > HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> > > HomePage : http://www.sjbaker.org > > Projects : http://plib.sf.net http://tuxaqfh.sf.net > > http://tuxkart.sf.net http://prettypoly.sf.net > -----BEGIN > > GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E---=20 > > W+++ N o+ K? w--- !O M- > > V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ > > y++++ -----END GEEK CODE BLOCK----- > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President > and CEO of > > GenToo technologies. Learn everything from fundamentals to system > > > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dc= lick > > _______________________________________________ > > plib-users mailing list > > pli...@li... > > https://lists.sourceforge.net/lists/listinfo/plib-users > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at > ThinkGeek For a limited time only, get FREE Ground shipping > on all orders of $35 or more. Hurry up and shop folks, this > offer expires April 30th! > http://www.thinkgeek.com/freeshipping/?cpg=3D> 12297 > > _______________________________________________ > > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/p> lib-users > ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ plib-users mailing list pli...@li... https://lists.sourceforge.net/lists/listinfo/plib-users |
From: Paolo L. <p.l...@ci...> - 2004-04-26 08:00:08
|
Michael, Is the problem setting custom properties for objects/materials? The approach based on inline comments doesn't meet my favour since a) it works only for ascii-text file (3D) formats such as AC3D, b) needs of manual editing as you update the file (risk to loose such addenda or to be enabled to do it only in its final version). I'm in favour of this alternative solution: A) manually write a simple text properties file - I use kinda .ini format: [property] Object-name Params ... [property] Material-name Params ... B) learn to parse your format, and, after having loaded the 3D data, walk the graph by first identifying nodes by name (either objects or materials, the getName() method works on both, and on non-states you have also the getByName() utility) - all 3D formats allow to identifiy objs/mats by a textual name - then setting node properties depending on the directive in the file. I use properties like envmap, mirror, no-lit (disable lighting), etc, some acting on leafs and others on states. This approach is not so heavy in the implementation, keeps 3D data and custom properties separate, and works for all 3D data formats. Greetings - Paolo > -----Messaggio originale----- > Da: pli...@li...=20 > [mailto:pli...@li...] Per conto di=20 > Michael Wessels > Inviato: venerd=EC 23 aprile 2004 18.47 > A: pli...@li... > Oggetto: Re: [Plib-users] Identifying objects after loading=20 > an AC3D- modell >=20 >=20 > Dear Steve, > I have implemented what you said. > But when I debug the application the code never jumps in the=20 > function ssgBranch *process_userdata ( char *data ) . My=20 > ac-file looks folowing:. >=20 > AC3Db > MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 =20 > spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat3" rgb 1 0=20 > 0 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 =20 > trans 0 MATERIAL "ac3dmat7" rgb 0.270588 0.52549 0.454902 =20 > amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans=20 > 0 MATERIAL "ac3dmat9" rgb 0 0 1 amb 0.2 0.2 0.2 emis 0 0 0 =20 > spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat13" rgb=20 > 0.533333 0.533333 0.533333 amb 0.2 0.2 0.2 emis 0 0 0 spec=20 > 0.5 0.5 0.5 shi 10 trans 0 OBJECT world kids 2 OBJECT group=20 > name "Race-Course" loc 0.560112 0.0001 0.361112 kids 4 OBJECT=20 > poly name "poly" loc -0.240913 0 -0.282012 texture=20 > "ASSPHALT.bmp" texrep 10 10 numvert 10 -0.1712 0 -0.1475=20 > -0.0751 0 -0.1577 0.0686 0 -0.1675 0.2239 0 -0.1789 0.3284 0=20 > -0.1871 0.3219 0 -0.2051 0.1242 0 -0.1854 -0.0899 0 -0.1724=20 > -0.1744 0 -0.1613 -0.1744 0 -0.1613 numsurf 10=20 > ............... ................ >=20 > I attach the .ac-file to this mail. > My intention is to seperate for example the >=20 > OBJECT group > name "Race-Course" >=20 > as a single object from the rest. > What can I do ? >=20 > Best regards >=20 > ----- Original Message -----=20 > From: "Steve Baker" <sjb...@ai...> > To: <pli...@li...> > Sent: Friday, March 26, 2004 3:35 AM > Subject: Re: [Plib-users] Identifying objects after loading=20 > an AC3D- modell >=20 >=20 > > Michael Wessels wrote: > > > > > in my '.ac' file I have the comment field "Tribune1". How=20 > can I tell=20 > > > the PLIB loaders to call a callback function in the=20 > application when=20 > > > they > find > > > this comment field ? > > > > Write a function like this: > > > > ssgBranch *process_userdata ( char *data ) > > { > > if ( data =3D=3D NULL || data [ 0 ] =3D=3D '\0' ) return NULL ; > > > > if ( strncmp ( "Tribune1", data, strlen ( "Tribune1" ) ) =3D=3D = 0 ) > > { > > ssgBranch *b =3D new ssgBranch () ; /* ...or whatever=20 > you want=20 > > this > node to be */ > > /* whatever you need to do here */ > > return b ; > > } > > > > return NULL ; > > } > > > > > > Sometime after ssgInit() but before you load your model: > > > > ssgLoaderOptions *loader_opts =3D new ssgLoaderOptions () ; > > loader_opts -> setCreateBranchCallback ( process_userdata ) ; > > /* You may wish to set other loader options here */ > > ssgSetCurrentOptions ( loader_opts ) ; > > > > ...then just load your model in the usual way and whenever=20 > SSG needs=20 > > to create a branch node, it'll call your 'process_userdata' > > function with the comment as the parameter. If this is a 'special' > > node, then you create the node and return it as the result.=20 > If it's=20 > > not special then just return NULL and the loader will do something=20 > > appropriate. > > > > ---------------------------- Steve Baker ------------------------- > > HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> > > HomePage : http://www.sjbaker.org > > Projects : http://plib.sf.net http://tuxaqfh.sf.net > > http://tuxkart.sf.net http://prettypoly.sf.net=20 > -----BEGIN=20 > > GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E---=20 > > W+++ N o+ K? w--- !O M- > > V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++=20 > > y++++ -----END GEEK CODE BLOCK----- > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President=20 > and CEO of=20 > > GenToo technologies. Learn everything from fundamentals to system=20 > >=20 > = administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck > > _______________________________________________ > > plib-users mailing list > > pli...@li...=20 > > https://lists.sourceforge.net/lists/listinfo/plib-users >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at=20 > ThinkGeek For a limited time only, get FREE Ground shipping=20 > on all orders of $35 or more. Hurry up and shop folks, this=20 > offer expires April 30th!=20 > http://www.thinkgeek.com/freeshipping/?cpg=3D> 12297 >=20 > _______________________________________________ >=20 > plib-users mailing list > pli...@li...=20 > https://lists.sourceforge.net/lists/listinfo/p> lib-users >=20 |
From: lahiani m. <lah...@cs...> - 2004-04-24 19:05:31
|
Hello 1. I try to write class that use like interface . I mean the class load 3ds object and the user can ask for : GetVertexes() ------ return vector ( or something else) with all the vertexes GetNormals()--------return vector with all the normals GetPolygon()--------return all the polygon that make the object And so on... The constractor look like: ssgEntity *obj ssgRoot scene; Parser(file_name) { obj = ssgLoad3ds(file_name); scene -> addKid ( obj ) ; some other things } now I want to use object and get all the vertex text coordinate normal ... how can I do it ??????? how can I search at the tree????? i try to use this func to print all to file but it isn't work good what the meaning of the int 12 in leaf -> print(fdest2,"",12); void parseFile::readScene(ssgEntity* e) { if ( e -> isAKindOf ( ssgTypeBranch() ) ) { ssgBranch *br = (ssgBranch *) e ; for ( int i = 0 ; i < br -> getNumKids () ; i++ ) { readScene ( (ssgEntity*)br -> getKid ( i ) ) ; } } else if ( e -> isAKindOf ( ssgTypeLeaf() ) ) { ssgLeaf* leaf = (ssgLeaf *) e ; //e->print(); leaf -> print(fdest2,"",12); } } 2. if I have 3ds object let say cub that each vertex in different color. How can I get the color of each vertex. Thanks Moti lahiani |
From: Michael W. <mic...@ti...> - 2004-04-23 17:47:05
|
Dear Steve, I have implemented what you said. But when I debug the application the code never jumps in the function ssgBranch *process_userdata ( char *data ) . My ac-file looks folowing:. AC3Db MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat3" rgb 1 0 0 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat7" rgb 0.270588 0.52549 0.454902 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat9" rgb 0 0 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0 MATERIAL "ac3dmat13" rgb 0.533333 0.533333 0.533333 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0 OBJECT world kids 2 OBJECT group name "Race-Course" loc 0.560112 0.0001 0.361112 kids 4 OBJECT poly name "poly" loc -0.240913 0 -0.282012 texture "ASSPHALT.bmp" texrep 10 10 numvert 10 -0.1712 0 -0.1475 -0.0751 0 -0.1577 0.0686 0 -0.1675 0.2239 0 -0.1789 0.3284 0 -0.1871 0.3219 0 -0.2051 0.1242 0 -0.1854 -0.0899 0 -0.1724 -0.1744 0 -0.1613 -0.1744 0 -0.1613 numsurf 10 ............... ................ I attach the .ac-file to this mail. My intention is to seperate for example the OBJECT group name "Race-Course" as a single object from the rest. What can I do ? Best regards ----- Original Message ----- From: "Steve Baker" <sjb...@ai...> To: <pli...@li...> Sent: Friday, March 26, 2004 3:35 AM Subject: Re: [Plib-users] Identifying objects after loading an AC3D- modell > Michael Wessels wrote: > > > in my '.ac' file I have the comment field "Tribune1". How can I tell the > > PLIB loaders to call a callback function in the application when they find > > this comment field ? > > Write a function like this: > > ssgBranch *process_userdata ( char *data ) > { > if ( data == NULL || data [ 0 ] == '\0' ) return NULL ; > > if ( strncmp ( "Tribune1", data, strlen ( "Tribune1" ) ) == 0 ) > { > ssgBranch *b = new ssgBranch () ; /* ...or whatever you want this node to be */ > /* whatever you need to do here */ > return b ; > } > > return NULL ; > } > > > Sometime after ssgInit() but before you load your model: > > ssgLoaderOptions *loader_opts = new ssgLoaderOptions () ; > loader_opts -> setCreateBranchCallback ( process_userdata ) ; > /* You may wish to set other loader options here */ > ssgSetCurrentOptions ( loader_opts ) ; > > ...then just load your model in the usual way and whenever SSG > needs to create a branch node, it'll call your 'process_userdata' > function with the comment as the parameter. If this is a 'special' > node, then you create the node and return it as the result. If it's > not special then just return NULL and the loader will do something > appropriate. > > ---------------------------- Steve Baker ------------------------- > HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> > HomePage : http://www.sjbaker.org > Projects : http://plib.sf.net http://tuxaqfh.sf.net > http://tuxkart.sf.net http://prettypoly.sf.net > -----BEGIN GEEK CODE BLOCK----- > GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- > V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ > -----END GEEK CODE BLOCK----- > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users |
From: Steve B. <sjb...@ai...> - 2004-04-23 04:06:30
|
jnilson_99 wrote: > i think you're missing the point. an image doesn't need to be sized based on > a power of two. only MIPMAPS need to be sized to a power of 2. No - that's not true. Even top level maps - or non-MIPmapped textures must be a power of two in size in each dimension. According to the RedBook description of glTexImage2D: "The width and height parameters give the dimensions of the texture image; border indicates the width of the border, which is either zero (no border) or one. Both width and height must have the form 2^m + 2b, where m is a nonnegative inteager (which can have a different value for width than for height) and b is the value of border." ...so, presuming you aren't using a one pixel border, your map has to be a power of two in both dimensions....no exceptions. You *might* get away with it in some (broken) OpenGL implementations - but it's definitely not legal and if your OpenGL library doesn't report a GL_INVALID_VALUE error when you do it - then there is a definite bug in your OpenGL library because the specification of that functions says it MUST produce that error. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: Steve B. <sjb...@ai...> - 2004-04-23 03:57:56
|
Wolfram Kuss wrote: >>i would like to avoid having to resize my image to something like 256X256. > > > You should DEFINITELY resize it. Computer graphics hardware needs > power of two. The only ways for a program to allow non-.power-of-two > are > a) don't use hardware accelaration Well, even without hardware accelleration, you still need a power-of-two map if you are using software-only OpenGL. The only way out would be not to use OpenGL and rasterize the image yourself - but that's a ridiculous choice. > b) resize it yourself, during each session > Both obviously bad. Well, (b) may be less than optimal - but it's not *that* bad. Actually, there is an OpenGL extension that allows you to use non-power-of-two textures on nVidia hardware - but there are a lot of really weird restrictions. Trust me - you NEED powers of two map dimensions. > Resizing it once "offline" with a good program, that can use a good > algorithm since it can take a second, is a much better idea. Yep. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: jnilson_99 <jni...@ya...> - 2004-04-22 22:51:32
|
i think you're missing the point. an image doesn't need to be sized based on a power of two. only MIPMAPS need to be sized to a power of 2. i got around my problem by creating my own class that extends ssgTexture and loads the image on its own. it looks like ssgTexture was once set up to create mipmaps, hence the boolean mipmap parameter in the following method: ssgTexture::ssgTexture ( const char *fname, int _wrapu, int _wrapv, int _mipmap ) i assume the parameter is there to flag ssgLoadTexture whether to create a mipmap after loading the texture. right now it assumes you want to create a mipmap out of EVERY texture you load. this is incorrect in my opinion. john ----- Original Message ----- From: "Wolfram Kuss" <w_...@rz...> To: <pli...@li...> Sent: Thursday, April 22, 2004 6:16 PM Subject: Re: [Plib-users] ssgMakeMipMaps >i would like to avoid having to resize my image to something like 256X256. You should DEFINITELY resize it. Computer graphics hardware needs power of two. The only ways for a program to allow non-.power-of-two are a) don't use hardware accelaration b) resize it yourself, during each session Both obviously bad. Resizing it once "offline" with a good program, that can use a good algorithm since it can take a second, is a much better idea. > >thanks > >john Bye bye, Wolfram. ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg297 _______________________________________________ plib-users mailing list pli...@li... https://lists.sourceforge.net/lists/listinfo/plib-users |
From: Wolfram K. <w_...@rz...> - 2004-04-22 22:37:14
|
>i would like to avoid having to resize my image to something like = 256X256. You should DEFINITELY resize it. Computer graphics hardware needs power of two. The only ways for a program to allow non-.power-of-two are a) don't use hardware accelaration b) resize it yourself, during each session Both obviously bad. Resizing it once "offline" with a good program, that can use a good algorithm since it can take a second, is a much better idea.=20 > >thanks > >john Bye bye, Wolfram. |
From: Paolo L. <p.l...@ci...> - 2004-04-22 15:01:39
|
Simon, It's a pity to have missed/underevaluated the topic in the list, infact this is a cool topic for me presently. I'm in the process of first-evaluating-then-start-designing an interface (of Plib-SSG) with OpenDE (formerly ODE) - Open Dynamics Engine. The idea is to introduce in my Plib-based viewer the ability to realisticly manipulate CAD originated geometries with a CyberGlove, which the viewer is already interfaced to. In this case gravitiy or spring-based action/reaction is not sufficient, so the choice of the "hard work" with OpenDE. In the rest of this talk I'll suppose you have a minimum SSG knowledge, otherwise I could have misunderstood the quest for the call. About the how-to, you can link whatever information to SSG nodes by set/getting the userdata: this is actually a pointer to a ssgEntity, so if you subclass from both ssgEntity and your nodedata class, you can pass it to those methods cleanly (no cast, please) and get ref counting. However the userdata is a way to make a node points to some information, so in this it's a "passive" mechanism. For getting something "active" consider using the node callbacks. Depending on the type of node there are pre/post draw, pre/post traversal, and, for state nodes there's just an apply-time callback. A limitation is that only one pre-somethig and one post-something callback per node can be set, so, for example in my application I have no callback slot free. We should extend this useful mechanism in 2.0 to multiple callbacks of the same type, isn't it? It shouldn't add performance penality. Regarding how to get the geometry off a ssgLeaf, proper get methods are available in the class for this. Usually collision detection is the only part of a physics engine where object geometry is taken into account, so, especially if you have complex geometries, an efficient way to pass scene graph meshes to the engine is key to memory consumption. Depending on how the geometry is collected by the physics engine, simple pointers to graphs' vertices/triangle indices structures could suffice (optimal case - no duplication), or an actual translation in engine's mesh format could require data duplication. If you are designing your own engine, of course consider not duplicating and complain to the low-level arrays format. For both the tasks a depth walk into a ssg will be needed in the pre-processing phase (once in the program execution) for establishing the needed cross-pointer network between the scene graph and the engine. A simple recursive function does acomplish the task - should you need one just ask it me. Finally there are methods in the ssgTransform nodes (the "father" of the array of leafs which contains the actual object geometry) to set transformation for the sub-graph nodes. So after your engine has determined the new position for an object you can set it by one of the multiple ways to set transformation data (position and/or orientation, the whole 4x4 matrix, and converting from/to quaternions through the SG library functions). Note that for data loaded by the 3DS loader, and most other ssg loader I think, the setName method does point to an ssgTransform, i.e. an object "starts" from the parent transformation node of its geometry. My opinion is that the physics engine *can* be "external" to the scene graph class, and some "wrapping" layer could put the engine in communication with the graph. But I could change opinion in the progress of my problem analysis. My last effort has been to make nvidia hardware shadow mapping to work with SSG, and, despite of thinking it could have a strict relation with ssgCullAndDraw internals, I call it but I didn't modified it or wrote my own. Nice to come back on this topic - Paolo -----Messaggio originale----- Da: pli...@li... [mailto:pli...@li...] Per conto di Simon Inviato: gioved=EC 22 aprile 2004 8.29 A: pli...@li... Oggetto: [Plib-users] ssg physics Hi, heres a summary of it all: I said - Hi, a while ago I posted about trying to hook up a physics engine to ssg. I don=92t recall getting any replies. I was wondering = if someone could give me an over view of how they go about adding things like gravity to each object. I have the feeling that I=92m missing something really basic. Wolfram said - Normally, you do something like this per iteration of the physics engine: calc forces=20 convert to accelaration speed =3D speed + accelaration * deltatime position =3D position + speed * deltatime In your case, accelaration is constant Then I said - Hi, thanks Wolfram its great to get a reply although I don=92t think I explained myself very well. The aim I=92m trying to = reach is to have a stack of blocks on top of each other. I then want to knock them down. I found this great physics example to do with dice falling down some stairs. I can get it to work with a non plib scene but I was trying to link it to an ssg tree. What I really want to know is how everyone goes about that. =20 In the non plib demo each object maintains a set of physics related properties. There is also a physics class that each inherits from. Basically the physics engine runs constantly and checks then updates each object in relation to each other object. I think in just writing this I am beginning to work the answer out myself. Isnt it funny how sometimes just writing or saying something out loud can make things so much clearer. So now I guess the question is should the physics engine class be added to the tree or left to run outside of it? It=92s a little difficult for me to recall everything as the project has been on hold until this bit gets worked out. For anyone interested; the demo that I=92m basing this on for now is from Chris Haag. I got it off his site originally but that seems to be down at the moment. Theres a copy of it on the NeHe site: http://nehe.gamedev.net/data/downloads/download.asp?letter=3DS It=92s called Stairs by Chris Haag. Thanks for the patience, if I get it to work then I could submit it as an ssg example. I=92m using the 3D Studio loader for the dice and the stairs so the example would incorporate that as well. At that point Adam said - (Feel free to correctme here guys.. ) My understanding is that with game design, the graphics engine (which=20 utilized the scene graph) and the physiscs engines are kept separate. An=20 object in question (say a car or a block in your example) has access to both=20 a physics model that represents it's behavior, as well as a pointer to it's=20 relevant information in the scene graph. That way, everytime you update an=20 object, it gathers information from it's current state and the physics=20 model, and then uses that information to manupulate it's characteristics within the scene graph. And that=92s when I sent the mail that you got and didn=92t know what it = was about. |
From: Simon <sim...@ho...> - 2004-04-22 07:33:55
|
Hi, heres a summary of it all: =20 I said - Hi, a while ago I posted about trying to hook up a physics = engine to ssg. I don't recall getting any replies. I was wondering if someone could give me an over view of how they go about adding things like = gravity to each object. I have the feeling that I'm missing something really = basic. =20 Wolfram said - Normally, you do something like this per iteration of the physics engine: =20 calc forces=20 convert to accelaration speed =3D speed + accelaration * deltatime position =3D position + speed * deltatime =20 In your case, accelaration is constant =20 Then I said - Hi, thanks Wolfram its great to get a reply although I = don't think I explained myself very well. The aim I'm trying to reach is to = have a stack of blocks on top of each other. I then want to knock them down. = I found this great physics example to do with dice falling down some = stairs. I can get it to work with a non plib scene but I was trying to link it = to an ssg tree. What I really want to know is how everyone goes about that. = =20 In the non plib demo each object maintains a set of physics related properties. There is also a physics class that each inherits from. Basically the physics engine runs constantly and checks then updates = each object in relation to each other object. I think in just writing this I = am beginning to work the answer out myself. Isnt it funny how sometimes = just writing or saying something out loud can make things so much clearer. =20 So now I guess the question is should the physics engine class be added = to the tree or left to run outside of it? It's a little difficult for me = to recall everything as the project has been on hold until this bit gets = worked out. For anyone interested; the demo that I'm basing this on for now is from Chris Haag. I got it off his site originally but that seems to be = down at the moment. Theres a copy of it on the NeHe site: =20 http://nehe.gamedev.net/data/downloads/download.asp?letter=3DS =20 It's called Stairs by Chris Haag. =20 Thanks for the patience, if I get it to work then I could submit it as = an ssg example. I'm using the 3D Studio loader for the dice and the stairs = so the example would incorporate that as well. =20 At that point Adam said - (Feel free to correctme here guys.. ) My understanding is that with game design, the graphics engine (which=20 utilized the scene graph) and the physiscs engines are kept separate. = An=20 object in question (say a car or a block in your example) has access to = both a physics model that represents it's behavior, as well as a pointer to = it's=20 relevant information in the scene graph. That way, everytime you update = an=20 object, it gathers information from it's current state and the physics=20 model, and then uses that information to manupulate it's characteristics = within the scene graph. =20 And that's when I sent the mail that you got and didn't know what it was about. |
From: jnilson_99 <jni...@ya...> - 2004-04-22 00:44:07
|
from ssgMakeMipMaps : if ( ! ((xsize & (xsize-1))=3D=3D0) || ! ((ysize & (ysize-1))=3D=3D0) ) { ulSetError ( UL_WARNING, "Map is not a power-of-two in size!" ) ; return false ; } i've used 3dstudio to build a model, but one of the textures' size is = not a multiple of 2 so ssgMakeMipMaps won't create a mipmap out of it. = this isn't a big deal because i don't need to create a mipmap out of = this particular image, just the default resolution of the image is all i = need. question: is there a way to have ssg load an image without automatically = trying to create a mipmap as well?=20 i would like to avoid having to resize my image to something like = 256X256. thanks john |
From: Steve B. <sjb...@ai...> - 2004-04-21 23:14:58
|
Simon wrote: > Hi, well Adam summed it all up for me quite well. Thank you it=92s rea= lly > appreciated. Now back to the drawing board to rework everything :=AC) Eh? Have I missed some conversation here? What are you talking about? ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++= -----END GEEK CODE BLOCK----- |
From: Brian S. <sch...@ho...> - 2004-04-21 19:19:12
|
I'm having a little trouble with the puComboBox, puSelectBox, and puButtonBox, I'm pretty positive it has to be with the array of strings I am sending it. here is how I construct the array: char *arrayOfStrings() = {"How", "Are", "You",NULL}; then declaring each of these puObjects I use arrayOfStrings as the parameter for the list. Is this how the array of Strings is supposed to be constructed? For puSelectBox I the list is showing correctly however when I click on a selection it won't register (I do have puMouse in my mouse func) and if I hit page down the list will pop up, but if I hit down I get an access violation. For puSelectBox, it shows the first element fine, but if I click on the arrow I get the same access violation error. Finally for puButtonBox the program will crash once it tries to display it with an access violation. It has to be the way I'm constructing my array, please let me know how your really supposed to do it. Thanks in advance -Brain _________________________________________________________________ Lose those love handles! MSN Fitness shows you two moves to slim your waist. http://fitness.msn.com/articles/feeds/article.aspx?dept=exercise&article=et_pv_030104_lovehandles |