Rotation object

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 23/01/2007 at 13:19, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   9.6 
Platform:   Windows  ;   
Language(s) :   C.O.F.F.E.E  ;

---------
Hi
What code have I to write to obtain the entire value of the horizontal rotation of an object?
Thank you

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 24/01/2007 at 14:23, xxxxxxxx wrote:

Can you be please a bit more specific? What kind of rotation do you need, global heading, pitch or bank, or x,y,z?

cheers,
Matthias

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 24/01/2007 at 14:55, xxxxxxxx wrote:

Ok! Really what I want to obtain is that on having rotated a called "Plane" object, the entire value of the horizontal rotation of this object assigns to itself to a variable to determine the file of a texture, for example: Tex0123.tif
Thx
main(doc,vActObj)
{
 var vObj, vRot;

var vName="Plane";
  vObj=doc->FindObject(vName);
  if (vObj==NULL) return;
 
 vRot=vObj->GetRotation();
  vActObj->SetRotation(vRot);
 
var fval = "0000" + tostring(vRot);
var mval = strmid( fval, sizeof(fval)-4,4);
var mfn = "F:\\ExemplesXPresso\\Textura\\Arboles\\Tex" + mval + ".tif";
//
var mat = doc->GetFirstMaterial();
mat->SetChannelState(CHANNEL_COLOR, TRUE);
// Sets a texture for it
var color = mat->GetChannel(CHANNEL_COLOR);
var colorC = color->GetContainer();
colorC->SetData(CH_TEXTURE, mfn);
color->SetContainer(colorC);
mat->Update();
}

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 24/01/2007 at 15:34, xxxxxxxx wrote:

In short, which I am interested in knowing is the rotation: global heading of object
Thx

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 25/01/2007 at 04:43, xxxxxxxx wrote:

this will give you the global rotation of an object.

var glrot = op->GetMg()->GetHPB();

glrot.x is the heading
glrot.y is the pitching
glrot.z is the banking

cheers,
Matthias

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 25/01/2007 at 11:07, xxxxxxxx wrote:

Thank you Matthias is exactly this what I want to know.
Regards,
Yamp
http://www.jcuadras-arquitecto.com/PaginasWeb/AnimacionesCinema4D.htm