GenRotateMatrix

Section: C Library Functions (3)
Updated: IRIT Version 6.0
Index Return to Main Contents
 

NAME

GenRotateMatrix()  

SYNOPSIS

geom_lib/convex.c:102

void GenRotateMatrix(MatrixType Mat, VectorType Dir)
 

DESCRIPTION

Routine to prepare a transformation martix to rotate such that Dir is parallel to the Z axes. Used by the convex decomposition to rotate the polygons to be XY plane parallel. Algorithm: form a 4 by 4 matrix from Dir as follows:
                |  Tx  Ty  Tz  0 |   A transformation which takes the coord
                |  Bx  By  Bz  0 |  system into T, N & B as required.
 [X  Y  Z  1] * |  Nx  Ny  Nz  0 |
                |  0   0   0   1 | N is exactly Dir, but we got freedom on T & B which must be on a plane perpendicular to N and perpendicular between them but thats all! T is therefore selected using this (heuristic ?) algorithm: Let P be the axis of which the absolute N coefficient is the smallest. Let B be (N cross P) and T be (B cross N).  

PARAMETERS:

Mat: To place the constructed homogeneous transformation.

Dir: To derive a transformation such that Dir goes to Z axis.  

FUNCTION RETURN VALUE

void

 

ORIGIN

(C) Copyright 1989/90-95 Gershon Elber, Technion, IIT


 

Index

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS:
FUNCTION RETURN VALUE
ORIGIN

This document was created by man2html, using the manual pages.
Time: 07:26:32 GMT, July 20, 2024