Coordinates etc.

Thanks for all that

Just a few more questions your honour.

]]The object.rotatepoint method uses the axes of the local group for the rotation.

]Kinda. The rotate point method uses the axis that you provide. If you are rotating an object’s point and set the axis to 0,1,0 then yes. The axis is your choice. You could make it the normal of a face and then rotate the the face points around that axis if you wanted etc.

Does that axis go through the local group origin?

And I don’t quite get the GetOrientation. andnbsp;The second group of coordinates (001 010) describes the andquot;upandquot; vector. andnbsp;Is that just the direction of the world up with respect to the local up- that is the world y from the local y?

George

Howdy,

I’ve been looking at the coordinate systems. andnbsp;Are these things right?

Points coordinates are with respect to an origin defined by the location of their parent group.

If a group is rotated, those coordinates do not change. andnbsp;The orientation property of the group changes.

If a group is translated, those coordinates do not change. andnbsp;The position property of the group changes.

The object.rotatepoint method uses the axes of the local group for the rotation.

object.transform changes coordinates to world coordinates. andnbsp;So in effect it adds the group location to all point coordinates. andnbsp;The group location doesn’t change, so the object is moved within the group.

Things I don’t understand:What do the parameters of GetOrientation mean?
object.GetOrientation(RelativeGroup As Variant,
DirX As Variant,
DirY As Variant,
DirZ As Variant,
UpX As Variant,
UpY As Variant,
UpZ As Variant)

I’m sure it’s straight forward as an analysis of the returns looks simple, but I don’t geddit.

Ta
George

Hi George,

]Points coordinates are with respect to an origin defined by the location of their parent group.

Yes.

]If a group is rotated, those coordinates do not change. The orientation property of the group changes.

Yes.

]If a group is translated, those coordinates do not change. The position property of the group changes.

Yes.

]The object.rotatepoint method uses the axes of the local group for the rotation.

Kinda. The rotate point method uses the axis that you provide. If you are rotating an object’s point and set the axis to 0,1,0 then yes. The axis is your choice. You could make it the normal of a face and then rotate the the face points around that axis if you wanted etc.

]object.transform changes coordinates to world coordinates. So in effect it adds the group location to all point coordinates.

Kinda. It all takes into account the orientation of the object so it isn’t a strict andquot;addandquot;.

]The group location doesn’t change, so the object is moved within the group.

That is the net effect. Though typically you use the andquot;Transformandquot;/andquot;InverseTranformandquot; to temporarily move an object to world coordinates because you want to work on it in world coordinates, or perhaps move it to another group.

]Things I don’t understand:What do the parameters of GetOrientation mean?
object.GetOrientation(RelativeGroup As Variant,
DirX As Variant,
DirY As Variant,
DirZ As Variant,
UpX As Variant,
UpY As Variant,
UpZ As Variant)

You’ll probably want to look at this message:

[img:1l0r2al3]http://www.amabilis.com/cgi-bin/YaBB/YaBB.cgi?board=3DCProScriptingandamp;action=displayandamp;num=999401523[/img:1l0r2al3]
<!– m –><a class="postlink" href="http://www.amabilis.com/cgi-bin/YaBB/YaBB.cgi?board=3DCProScriptingandamp;action=displayandamp;num=999401523">http://www.amabilis.com/cgi-bin/YaBB/Ya … =999401523</a><!– m –>

(You likely didn’t find it since it is under andquot;SetOrientationandquot; not andquot;GetOrientationandquot; <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>)

Richard

]Does that axis go through the local group origin?

Yes it does. So technically if you need to rotate a face around its normal you would have to temporarily center the object on the face’s center.

Orientation is a bit difficult to grasp. It was for me anyhow. Think of it this way: You are flying in an airplane… The direction that the plane is headed is the direction vector DirX, DirY, DirZ (normalized to 1 unit in length). If you are standing in the airplane, the vector from your feet to your head is the up vector, UpX, UpY, UpZ (normalized to 1 unit in length). In other words, you can express direction with a single vector, but you can’t express orientation with a single vector since you need something that says which way is andquot;upandquot;.

These direction and up vectors are actually just components of the 4×4 Transformation Matrix for the object. The Transformation matrix for an object can be broken up into Direction, Up, Left, scale factor and position. So if you like to think in terms of the transformation matrix…. (I don’t).

Also, Dir and Up are relative to whatever group you provide as the andquot;relative groupandquot;.

Richard

You must be logged in to reply in this thread.

4 posts