Search found 18 matches

by MisterRose
Fri Jul 22, 2011 3:05 pm
Forum: Advanced Help
Topic: Quaternion input
Replies: 7
Views: 696

Re: Quaternion input

I tried that, but it produced an odd rotation when I pitched or rolled. I think that has to do with the order of operations in the Euler rotation.
by MisterRose
Fri Jul 22, 2011 12:52 pm
Forum: Advanced Help
Topic: Quaternion input
Replies: 7
Views: 696

Re: Quaternion input

It is right handed with Z down. Do I need to invert it to switch the handedness, and then do a rotate?

The simple solution is to just realign the device so that roll/pitch are correct, but I'd think that I can also do this in software. I just have to figure out how.
by MisterRose
Thu Jul 21, 2011 10:00 pm
Forum: Advanced Help
Topic: Quaternion input
Replies: 7
Views: 696

Re: Quaternion input

I was able to get things mostly working. It all boiled down to a few lines of code... qRot = device->GetQuaternion(); qRot.toEuler(rot); vector3df rot*=core::RADTODEG; node->setRotation(rot);   The last thing I need to do (I think) is to rotate the mesh 90 degrees around the Z axis. The problem I am...
by MisterRose
Thu Jul 21, 2011 12:35 pm
Forum: Beginners Help
Topic: Basic Quaternion help
Replies: 8
Views: 656

Re: Basic Quaternion help

Thank you for that! I had overlooked that when I was coding things up.

So what I need to do now is to rotate the mesh to point along the axis and then roll about it.
by MisterRose
Wed Jul 20, 2011 1:23 pm
Forum: Beginners Help
Topic: Basic Quaternion help
Replies: 8
Views: 656

Re: Basic Quaternion help

The reason I was doing it that way was so that I could input numbers that I can visualize. I'm new to 3D graphics and so I'm still coming up to speed on the details of how this is all supposed to work. The node is just an animated mesh scene node created with... node = smgr->addAnimatedMeshSceneNode...
by MisterRose
Wed Jul 20, 2011 1:31 am
Forum: Beginners Help
Topic: Basic Quaternion help
Replies: 8
Views: 656

Re: Basic Quaternion help

I got it! I forgot to convert back to degrees.   quaternion q1 = FromEuler(roll, heading, pitch); q1.normalize(); q1.toEuler(rot); node->setRotation(rot*RADTODEG);   The only thing that I need to look at was the FromEuler on the link above has roll and pitch reversed. I'll have to think that through...
by MisterRose
Wed Jul 20, 2011 1:11 am
Forum: Beginners Help
Topic: Basic Quaternion help
Replies: 8
Views: 656

Re: Basic Quaternion help

I read the link you posted (which was very informative) and I used the FromEuler function on the page to create my quaternion. Here's the code... vector3df rot; quaternion q1 = FromEuler(45, 35, 0); q1.normalize(); q1.toEuler(rot); node->setRotation(rot); It still does not rotate. I have to be overt...
by MisterRose
Tue Jul 19, 2011 11:13 pm
Forum: Beginners Help
Topic: Basic Quaternion help
Replies: 8
Views: 656

Basic Quaternion help

I have been looking at forum posts, sample code, and tutorials for the past week and I am still not quite understanding something. I am making a basic model viewer that loads in a mesh from a file and renders it on the screen. I have the camera set down the negative Y axis looking towards the origin...
by MisterRose
Thu Jul 14, 2011 2:39 pm
Forum: Beginners Help
Topic: No texture when loading a mesh
Replies: 5
Views: 527

No texture when loading a mesh

Disclaimer - I am new to 3D programming, but I have been doing embedded software for about 15 years. Please forgive me if this is a trivial problem. I am trying to use objects from various files (mainly Maya obj and 3DS) . I do not see any errors logged to the console when I load the mesh. So far I ...
by MisterRose
Tue Jul 12, 2011 2:17 pm
Forum: Advanced Help
Topic: Quaternion input
Replies: 7
Views: 696

Quaternion input

I have an electronic device which can stream it's orientation in quaternion format. I'd like to take that quaternion and apply it to a mesh that I have loaded. This way, as I move the physical device, the mesh can mimic the move. What functions should I be looking at? Does anyone know of any example...
by MisterRose
Mon Jun 27, 2011 11:24 am
Forum: Code Snippets
Topic: Euler rotations from direction and up vectors
Replies: 3
Views: 4853

I had to change the following line from

quatDirection.getMatrix(mat);

to

mat = quatDirection.getMatrix();

I guess someone changed that function to make it more consistent with the other classes.
by MisterRose
Sun Jun 26, 2011 4:14 pm
Forum: Beginners Help
Topic: Relative Rotation
Replies: 1
Views: 336

Relative Rotation

I am looking for some greatly simplified code to handle the motion of a node. When I add a node it gets added to the origin and I see everything fine. I can set the rotation and everything behaves as expected. What I would like to do is to take that node and rotate it relative to its current orienta...
by MisterRose
Thu Jun 23, 2011 1:55 pm
Forum: Beginners Help
Topic: Read/Write a file
Replies: 5
Views: 636

I was hoping for a file that I could read and write from at the same time, but I guess that is not part of the framework.

Is there a technical reason that reading from an IWriteFile is not supported?
by MisterRose
Wed Jun 22, 2011 9:10 pm
Forum: Beginners Help
Topic: Read/Write a file
Replies: 5
Views: 636

Read/Write a file

I see there is a IWriteFile, but there is no method to read it.

Is there a way to open a file once and be able to read and write to it, without going native?

It seems a little silly to have a file you can write to, but then you cannot read back from it without opening the file in a reader.
by MisterRose
Tue Jun 21, 2011 5:13 pm
Forum: Advanced Help
Topic: Video Texture
Replies: 1
Views: 447

Video Texture

I may not be searching for the right term.

What I want to do is to use a video file as a texture for a 3D object. I see this working as creating a cube scene node and then adding a video as a texture instead of a PNG or JPEG.

Is this possible?