Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Need your help again ...

  1. #1
    Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Arlon, Belgium
    Posts
    486

    Need your help again ...

    Hi,

    I need your help again ...

    For my T3D converter, I've a line in the T3D :

    Location=(X=%f,Y=%f,Z=%f)


    My problem is that the line is never
    like that !

    Sometimes, the line looks like this, it depends
    if the polygon is placed or not in the space :

    Location=(X=512.000000)

    or

    Location=(Y=123.000000)

    or

    Location=(X=512.000000,Y=126.0000)

    or

    Location=(X=512.000000,Z=129.0000)

    or

    Location=(Z=5)

    or

    Location=(X=1,Y=-1,Z=6)

    etc ........

    I'd like to write a function for conserve
    the X, Y, Z values and if the values aren't in
    the line, the values = 0.0f

    Someone can help me ?

    Thanks in advance

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: Need your help again ...

    Parse the string character by character. If the first (non white) character an X, parse a number and assign it to X. If it's a Y, you do the same, but assign the value to Y instead.

  3. #3
    Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Arlon, Belgium
    Posts
    486

    Re: Need your help again ...

    Hi,

    I've fixed the problem.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •