Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Virtual Reality Toolbox: rotation using matrix?
Date: Fri, 1 May 2009 20:44:02 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 35
Message-ID: <gtfmui$n21$1@fred.mathworks.com>
References: <1d7fcf89-1d1a-448a-bd80-ccf27bff630f@x1g2000prh.googlegroups.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1241210642 23617 172.30.248.38 (1 May 2009 20:44:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 1 May 2009 20:44:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 838966
Xref: news.mathworks.com comp.soft-sys.matlab:536786


For conversion from rotation matrix to axes/angle, use the function "VRROTMAT2VEC".

For node attributes: create a node, then use fields(node):

car = vrnode(world, 'Automobile')
%% Viewing Fields of Nodes
% VRML fields of a given node can be queried using the FIELDS command.
% You will see that there are fields named 'translation' and 'rotation'
% in the node list. You can move the car around by changing the values of
% these fields.
fields(car)

see vrcar.m for a detailed demo.

Hope this helps.

Arkadiy Turevskiy
The MathWorks

Alexander Erlich <alexander.erlich@gmail.com> wrote in message <1d7fcf89-1d1a-448a-bd80-ccf27bff630f@x1g2000prh.googlegroups.com>...
> Hello,
> 
> I'm very new to Virtual Reality Toolbox, and one of the many questions
> I have is this. The demos, like the car in the mountains demo, show
> that you can do rotations this way:
> 
> car.rotation = [0, 1, 0, -0.7];
> 
> Yet I would prefer to use my own own matrix for rotation, which I have
> put together using Euler's angles. How can I apply it?
> 
> Also, where can I search for attributes or properties of the nodes?
> vrnode didn't yield any of this information.
> 
> Alexander