Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::math::vector::RotateMast Function
C++
MATHLIB_EXPORT void RotateMast(PTRANSFORM pt, PCVECTOR vup);
Parameters 
Description 
PTRANSFORM pt 
transform to set the up direction of 
PCVECTOR vup 
new direction for 'up' 

Sets the current 'up' axis of a transformation. The forward axis is adjusted so that it remains perpendicular to the mast axis vs the right axis. After the forward axis is updated, the right axis is adjusted to be perpendicular to up and forward.

RotateMast is based on the idea that your current frame is something like a boat. As the boat moves along a surface, it's version of 'up' may change depending on the landscape. This keeps up up. (Actually, the computation was used for an object running along the interior of a sphere, and this normalizes their 'up' to the center of the sphere.

Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!