Skip to main content
GameDev.net gamedev.net
🔒 Locked

help parsing matrix data

Started by arbuckle911 Sep 23, 2006 at 10:37 PM 1 replies 650+ views
Original Post
arbuckle911
arbuckle911
I have this data that was taken from the IGame exporter for 3dsmax. I've managed to correctly load translation and rotation, however this scaling data has me confused, I've tried applying it to the modelview matrix a few different ways but no luck, just looking for some ideas. Here is the data:

		<NodeTM>

			<Translation>

				-92.223709 21.591661 -0.674699

			</Translation>

			<Rotation>

				-0.141413 -0.518271 0.222023 0.813698

			</Rotation>

			<Scale>

				1.000000 1.000000 1.000000 0.000000 0.016452 0.086709 0.996098

			</Scale>

		</NodeTM>

another example:

<NodeTM>

			<Translation>

				-49.673355 -4.907297 -140.237167

			</Translation>

			<Rotation>

				0.000000 0.000000 0.000000 1.000000

			</Rotation>

			<Scale>

				0.118974 0.118974 0.118974 0.000000 0.000000 0.000000 1.000000

			</Scale>

		</NodeTM>

basically I need to figure out what numbers on the scale line do what and how to apply them to a matrix. I've tried using the first 3 numbers as a glScalef(x, y, z), but that didn't work.
StPapyna
StPapyna
XML ? maybe you should use DOM or SAX to get the data out,then use glTranslate and glRotate.if you want to load matrix manually,you should check the redbook or some others 3D graphic books.
stuh505
stuh505
It would help if you said what the scale values of the object were in Max before exporting...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.