allocTransXyz(3)

NAME
allocTransEul, allocTransPao, allocTransRot, allocTransRpy, allocTransXyz -- functions which allocate transforms and initialize them at the same time.

USAGE
#include <rccl.h>

TRSF *allocTransEul (name, pool, px, py, pz, phi, the, psi)
  const char* name;
  int pool;
  float px, py, pz, phi, the, psi;

TRSF *allocTransPao (name, pool, px, py, pz, ax,ay,az, ox,oy,oz)
  const char* name;
  int pool;
  float px, py, pz, ax, ay, az, ox, oy, oz;

TRSF *allocTransRot (name, pool, px, py, pz, vector, h)
  const char* name;
  int pool;
  float px, py, pz, h;
  VECT *vector;

TRSF *allocTransRpy (name, pool, px, py, pz, roll, pitch, yaw)
  const char* name;
  int pool;
  float px, py, pz, roll, pitch, yaw;

TRSF *allocTransXyz (name, pool, px, py, pz)
  const char* name;
  int pool;
  float px, py, pz;

ARGUMENTS

name --
    Name of the transform (optional; can be specified as NULL if not required).

pool --
    Memory area from which to allocate the transform. Under the current implementation, there is one memory area on each CPU, so pool is actually a CPU number. The idea is to allocate the transform on the CPU where it will be accessed the most. If you don't care what memory pool is used to allocate the transform, give this argument as UNDEF.

px, py, pz --
    Translation components along the x, y, and z axes (the transform's p vector).

phi, the, psi --
    Euler angles representing rotation (in degrees) first about the z axis, then about the new y axis, and finally about the new z axis.

ax, ay, az --
    Components of a vector parallel to the transform frame's z axis (the a vector).

ox, oy, oz --
    Components of a vector parallel to the transform frame's y axis (the o vector).

vector --
    A vector describing an axis about which a rotation is defined. The vector does not have to be normalized.

h --
    Amount of rotation (in degrees) about an specified axis.

roll, pitch, yaw --
    Roll, pitch, and yaw angles which represent rotations (in degrees), first about the z axis, then about the new y axis, and finally about the new x axis, respectively.

RESTRICTIONS
These routines must be called from the planning level.

DESCRIPTION
These routines allocate a new transform, using the routine allocTrans() (q.v.), and then instantiate the transform with the indicated values. The transforms may be freed using freeTrans(). The pool argument is the same as in allocTrans(); it is used to control the physical location of the transform memory; when in doubt, set pool to UNDEF and let the system decide which pool to use.

allocTransEul() returns a transform with a specified translation and a rotation specified by a set of Euler angles.

allocTransPao() returns a transform with a specified translation and a rotation specified by two vectors, ostensibly parallel to the a and o vectors of the corresponding rotation matrix. These vectors do not have to be parallel, and do not have to be perpendicular, since a coordinate system is constructed from them using the same algorithm used by vaoToTrsf(3).

allocTransRot() returns a transform with a specified translation and a rotation specified by a single rotation about a particular axis.

allocTransRpy() returns a transform with a specified translation and a rotation specified by a set of roll-pitch-yaw angles.

allocTransXyz() returns a transform with a specified translation only (the rotational component is set to the identity).

DIAGNOSTICS
These routines return NULL in the event of an error. They will automatically abort the program if the option RCCL_ERROR_EXIT is set (see rcclSetOptions(3)). Error codes and messages are placed on the errorStack (q.v.). The following error codes may be set:

EMemory --
    Not enough memory left in the shared memory pool.

EDuplicate --
    Attempt was made to create a transform with the same name as one already allocated.

These routines will abort the program if called from the control level.

SEE ALSO
allocTrans(3), allocMem(3), vaoToTrsf(3), eulToTrsf(3), rotToTrsf(3), rpyToTrsf(3), xyzToTrsf(3), errorStack(3).