From: Dick Rous (dick++at++sgi.com)
Date: 06/28/2004 07:09:22
Sorry,
I did not see the earlier posting about pfMatrix before.
You could use Performer's cull functions to determine
which terrain tiles are visible, e.g. pfChannel::contains(const pfBox* box).
See man pfFrustum for details.
Dick.
> -----Original Message-----
> From: Dick Rous
> Sent: Monday, 28 June, 2004 15:36
> To: 'Simon Perreault'; Deepthi Singh
> Cc: info-performer++at++sgi.com
> Subject: RE: [info-performer] Transformation Matrix
>
>
> Performer has a number of convenience functions for this kind
> of calculations.
> E.g. from x, y, z, h, p, r (pfCoord) to pfMatrix:
> pfMatrix::makeCoord(const pfCoord *c)
>
> See man pfmatrix for details.
>
> Dick.
>
> > -----Original Message-----
> > From: owner-info-performer++at++performer.engr.sgi.com
> > [mailto:owner-info-performer++at++performer.engr.sgi.com]On
> Behalf Of Simon
> > Perreault
> > Sent: Monday, 28 June, 2004 14:36
> > To: Deepthi Singh
> > Cc: info-performer++at++sgi.com
> > Subject: Re: [info-performer] Transformation Matrix
> >
> >
> > Deepthi Singh wrote:
> > > Can you please help me with the updating? I want to know how
> > > to create the Transformation matrix from xyz and hpr values of the
> > > camera ? I think there is something wrong in the way I'm
> > using my hpr
> > > values.
> >
> > hpr values are given in degrees and correspond to a rotation
> > around axis
> > z followed by a rotation around axis x followed by a
> rotation around
> > axis y. The three values are given in that order. To convert to a
> > rotation matrix, the following Matlab function can be used:
> >
> > function R = rotm( h, p, r )
> >
> > Rx = [ 1 0 0
> > 0 cos(p) sin(p)
> > 0 -sin(p) cos(p) ];
> > Ry = [ cos(r) 0 -sin(r)
> > 0 1 0
> > sin(r) 0 cos(r) ];
> > Rz = [ cos(h) sin(h) 0
> > -sin(h) cos(h) 0
> > 0 0 1 ];
> > R = Ry * Rx * Rz;
> >
> > Converting this to a C++ funciton should be trivial. See the
> > Performer
> > manual on page 31 for a helpful figure.
> >
> > --
> > Simon Perreault <nomis80++at++nomis80.org> -- http://nomis80.org
> >
> > --------------------------------------------------------------
> > ---------
> > List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> > Open Development Project: http://oss.sgi.com/projects/performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
> > --------------------------------------------------------------
> > ---------
> >
>
This archive was generated by hypermail 2b29 : Mon Jun 28 2004 - 07:09:08 PDT