Search found 18 matches
- 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.
- 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.
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.
- 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...
- 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.
So what I need to do now is to rotate the mesh to point along the axis and then roll about it.
- 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...
- 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...
- 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...
- 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...
- 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 ...
- 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...
- Mon Jun 27, 2011 11:24 am
- Forum: Code Snippets
- Topic: Euler rotations from direction and up vectors
- Replies: 3
- Views: 4853
- 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...
- Thu Jun 23, 2011 1:55 pm
- Forum: Beginners Help
- Topic: Read/Write a file
- Replies: 5
- Views: 636
- 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.
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.
- 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?
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?