Export to RH coordinate system



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/07/2009 at 00:41, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   11 
    Platform:    Mac  ;  
    Language(s) :     C++  ;

    ---------
    Hi All

    I have written an exporter using the sdk and everything loads and renders fine, except it is mirrored in the zy plane, presumbly because of the handedness of my renderer, OpenGL, which I think is RH.

    Is there a way to easily export the geometry into. RH system? Am sure this is noddy, but can't figure it out? All help appreciated!!!!

    Cheers
    H



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/07/2009 at 01:31, xxxxxxxx wrote:

    Have you tried to flip/invert the X coordinates?

    cheers,
    Matthias



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/07/2009 at 04:07, xxxxxxxx wrote:

    I'll give it a go. Basically I flipped them but the relationship of the objects to their parents wasn't correct. Perhaps I need to multiple the matrices I export by an X reflection?

    I'll give your suggestion a other go though as I have since discovered a problem in my hierachy that was clouding the issue - objects where being given somewhat random parents due to the fact that strcmp on the mac can return arbitrarily positve and negative numbers and not just 1 or -1

    Cheers!
    H



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/07/2009 at 09:51, xxxxxxxx wrote:

    strcmp() (by C and C++ standards) returns the number of mismatched characters, not 1,0,-1:

    The return value of this function indicates the lexicographic relation of string1 to string2.

    For the C4D C++ SDK, why aren't you using the String class and the comparitive operators or Compare(), LexCompare(), RelCompare()?

    ****

    That said, you should really be using a Similarity matrix to convert coordinate system handedness. There is a post (by yours truly) here which shows the right- >left conversion. It should be simple to do the opposite (inverse matrix).



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/07/2009 at 13:41, xxxxxxxx wrote:

    strcmp() (by C and C++ standards) returns the number of mismatched characters, not 1,0,-1:

    my mistake - the engine works when compiled under windows with VC, I guess I've gotten that wrong for years! Goes to show that it's always best to check the help!

    > why aren't you using the String class and the comparitive operators or Compare(), LexCompare(), RelCompare()?

    Because I have a small hierarchy that is being searched in my engine at load time - I didn't want to use some numerical, human unreadable key for a polygon object, so I am using a string. It's not performance critical - just used to find nodes and squirrel them away.

    I'll check that post out, although I did a search and didn't see anything earlier, but I'll take another squiz.

    Thanks
    H



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/07/2009 at 14:00, xxxxxxxx wrote:

    Here's the url to the thread (last post) :

    http://www.plugincafe.com/forum/display_topic_threads.asp?ForumID=4&TopicID;=2993&PagePosition;=82

    The inverse (operator) of Matrix sm is !sm:

    sm = !sm;


Log in to reply