|
|
trueSpace SDK questions
About Truespace Archives
These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.
They are retained here for archive purposes only.
trueSpace SDK questions // Archive: Tech Forum
Post by remnar // Sep 1, 2006, 7:50am
|
remnar
Total Posts: 105
|
Hello. Any one know if plugin support will still be available in ts7 and if they will release an SDK for it? Also I have a question about the current SDK (6.6). There are quite a few undocumented functions and one of them is
TSXAPIFN tsxGNODE* tsxSizeTextCreate(char *text, char* family, double size, double *direction, double *pt, SHORT style);
Could someone from Caligari tell me if the direction and pt parameters are arrays? I am assuming, direction would be a 3 element array, and pt is a 2 element array. If I'm wrong, please explain what the params are for thankyou. |
Post by JPSofCA // Sep 1, 2006, 10:29am
|
JPSofCA
Total Posts: 300
|
Here is where you can find the Developer's Guide (http://cart1.caligari.com/ebuy2/download/files/ts7/tS7_DG.zip) |
Post by stan // Sep 1, 2006, 10:43am
|
stan
Total Posts: 1240
|
Richard..you can still use the 6.6 sdk because the model side of ts7 is ts6.6..
I asked about the ts7 sdk awhile back..read here->
http://forums1.caligari.com/truespace/showthread.php?t=385 |
Post by chamaeleon // Sep 2, 2006, 8:40am
|
chamaeleon
Total Posts: 74
|
The problem is that there are two functions defined, tsxTextCreate and tsxSizeTextCreate. tsxTextCreate is documented in the accompanying word document, while tsxSizeTextCreate is not (as of SDK v6.6). The difference between the two are a couple of undocumented parameters. All Richard has to go by is the definition he included in the message. One can make all kinds of guesses what is supposed to be passed in a parameter of type "double *", but it is obviously so much easier if the people that implemented it told you in advance that it is in fact supposed to be an array of size n (perhaps. Maybe it's just supposed to be a pointer to a single double. No way to tell), along with an explanation of what values in this array are supposed to represent. "double *" tells you nothing of this. "double *direction" indicates, perhaps a vector. But then you have to wonder why they don't use their own definition, tsxVector3f, for instance. |
Post by frootee // Sep 8, 2006, 7:30am
|
frootee
Total Posts: 2667
|
In this sort of situation the only thing one can do is develop a set of test cases which would likely rule out the incorrect possibilities, and retain the correct ones. For example,
case 1: pointer to: variable of type double
case 2: pointer to: array of type double
which ones work / do not generate warnings / errors?
which ones fail / cause truespace and/or computer freezes?
Frootee |
Post by chamaeleon // Sep 8, 2006, 1:32pm
|
chamaeleon
Total Posts: 74
|
Personally, I would never want to write code against an undocumented part of an API. My time is too valuable to me for that. Since neither of your two cases will generate compile errors, you're left with a tedious and irritating set of tests to see what happens during runtime for various parameters.
Since passing an array that is too big will only result in extraneous elements being ignored, it may be difficult to determine whether you got it right, compared with an array that is too small and the random bytes following your data just happens to result in a visually acceptable result.
Anyway, I'm not personally spending too much time worrying about what the current API is like. I'm much more interested in seeing what will come out in the future. Given the Link Editor functionality and its scripting facilities along with an object model encapsulating everything from the scene to scripting components, I imagine the API could be radically different, in order to take advantage of all functionality being pushed into the Player part. |
Post by stan // Sep 8, 2006, 1:41pm
|
stan
Total Posts: 1240
|
I can tell you it has to do with location [or spacing] and direction of the text because I can get it to generate text , but it's all piled in the same spot.. ..that said..and my very simple :D knowledge of these things..could it be in this form direction[i] with a loop? is that not a form of array? :confused:
Gord :cool: |
|