Login Action Required

The NinevehGL Forum uses a new concept of "socialized forum" or as we like to say "Tweet Forum".

Here is the deal:
  1. No new registration is required. Just sign in with your Twitter account and authorize the NinevehGL Forum.
  2. Once you’re in, you'll be able to "Follow a Thread", that means every time that thread receive a new post or update you'll receive a mention on your twitter.
  3. Besides, you can enable "Auto Share", then every new post and/or thread you make will be tweeted on your timeline. (By default, auto-share is enabled only for your threads)

Forum Rules:

1. We understand human comunication can become "hot" sometimes. So some insults and bad words ARE allowed. Just don't push too much being an asshole all the time.

2. SPAMMERS are not allowed. There are penalties for this kind of user and they can be banned forever.

3. You can report other users, if you judge necessary. An user reported many times by many people can also be banned forever. However you can also receive penalties for report deliberately for no apparent reason.

If there is a similar thread title, make sure the other one doesn't already have the answer you're looking for.

This forum uses the BBCode (Bulletin Board Code), here are some instructions:

Bold: [b]text[/b]
Italic: [i]text[/i]
Underline: [u]text[/u]

Code: [code]text[/code]

[ul] [*]item [/ul]
[ol] [*]item [/ol]



Embed (videos, code, 3D):

Welcome to the NinevehGL's world!
NinevehGL is a 3D engine forged with pure Obj-C.
Welcome to the
Hello, Guest.

Your current vote:

You can change your vote many times. But it's still one single vote.

Rotation around an arbitrari Point
Vote this thread:


Posts: 7


Sun, Jan 6 2013

Hi, I'm trying to achieve rotation of meshes around an arbitrari point for example 0,0,0. The thing is that mesh rotation happens on it's own coordinate axis. So in oder In order to do that I need to

  1. Translate rotation axis to coordinate axis
  2. Perform rotation
  3. Do inverse translation

This is what I've got

[object translateToX:0.0 toY:0.0 toZ:0.0];
[object setRotateX:rotateX];
[object translateToX:?? toY:?? toZ:??];

So the questions are. How to I calculate the inverse translation? Is there an easiest way to achieve this kind of rotation? Below an image of what I am trying to achieve.

0% like this - 0/0


Posts: 571


Tue, Jan 8 2013

In response to: @germangda

Hi buddy,

Seems you're doing a large path to do a short thing.
The question is very simple. You must use the pivot. Just it.

But remember that pivot affects not only the rotation, the position and scale are also affected.
So, for example, let's say that you want to rotate the mesh about the point x = 1,0, y = 0.5, z = 0.25.
Set its pivot to 1.0, 0.5, 0.25 and then move the mesh position to -1.0, -0.5, -0.25. This will make rotation, scale and position works around the specified pivot (1.0, 0.5, 0.25) however the mesh will stay in the original position (0.0, 0.0, 0.0).

That's it.
100% like this - 1/1


Posts: 7


Tue, Jan 8 2013

In response to: @dineybomfim

Woo! I thought that pivot was not working but I see that I was using it wrong, I will try it, thanks man!
0% like this - 0/0

NinevehGL is a 3D engine built right on top of OpenGL ES and it uses all the programmable pipeline power, making it easy for you to create great application with shaders.

Share on

Follow NinevehGL
Fastest way to contact us:

Copyright © 2011 db-in. All rights reserved.