*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/nmode (3)              
Title
Content
Arch
Section
 

Contents


nmode(3G)							     nmode(3G)


NAME    [Toc]    [Back]

     nmode - specify renormalization of	normals

C SPECIFICATION    [Toc]    [Back]

     void nmode(mode)
     long mode;

PARAMETERS    [Toc]    [Back]

     mode   expects a symbolic constant.  There	are two	defined	constants for
	    this parameter:

	    NAUTO causes normals to be renormalized only if the	current
	    ModelView matrix is	not orthonormal. (default)

	    NNORMALIZE causes normals to always	be renormalized, regardless of
	    the	current	ModelView matrix.

DESCRIPTION    [Toc]    [Back]

     IRIS systems transform vertex normals from	object-coordinates to eyecoordinates
 before	doing lighting calculations.  While the	matrix mode is
     MVIEWING, a separate Normal matrix	is maintained to support this
     transformation.  The Normal matrix	is the inverse transpose of the
     upper-left	3 x 3 portion of the ModelView matrix.

     Transformed normals must be unit length if	the lighting calculations are
     to	be meaningful.	Transformed normals will be unit length	if 1) they
     were unit length in object-coordinates, and 2) the	current	Normal matrix
     is	orthonormal (see notes).  If one or both of these conditions are not
     met, the normal must be normalized	(corrected to have unit	length)	after
     it	is transformed.	 nmode helps the system	determine when normalization
     is	required.

     Each time the ModelView matrix is changed,	the IRIS determines whether
     the resulting (inverse-transpose) Normal matrix is	orthonormal or not,
     and saves the result of the test as a flag.  After	each normal is
     transformed, both this flag and the nmode flag are	tested.	 If nmode is
     NAUTO, the	normal is normalized if	and only if the	flag is	set (i.e. the
     ModelView matrix is not orthonormal).  NAUTO mode is appropriate when the
     model normals are known to	be unit	length.	 If nmode is NNORMALIZE, the
     normal is normalized unconditionally.  NNORMALIZE mode is appropriate
     when the model normals may	not be unit length.

     NAUTO is the default nmode.

     Because normalization involves division by	a computed square root,	it can
     adversely affect system performance.

SEE ALSO    [Toc]    [Back]

      
      
     mmode, loadmatrix,	multmatrix, rot, scale,	translate, lmbind






									Page 1






nmode(3G)							     nmode(3G)


NOTES    [Toc]    [Back]

     IRIS-4D G,	GT, and	GTX models, and	the Personal Iris, do not support
     nmode.

     nmode cannot be used while	draw mode is MSINGLE.

     On	Impact and Infinite Reality NAUTO is  not supported.  Normals are
     always normalized.

     For our purposes a	matrix is orthogonal if	it transforms normals to the
     same length regardless of their direction,	and it is orthonormal if this
     length is the same	as the untransformed length.  Rotation matrixes	are
     always orthonormal. Scale matrixes	are orthogonal but not orthonormal if
     the three scale values are	identical, neither orthogonal nor orthonormal
     otherwise.	 Uniform scale ModelView matrices can be normalized to the
     identity matrix, and are therefore	ignored	by the Normal matrix.
     Translations do not affect	the upper-left 3x3 ModelView matrix, and are
     therefore also ignored by the Normal matrix.

     The length	of a normal is the square root of its dot product with itself.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
glNormalPointer Tru64 define an array of normals
glnormalpointer IRIX define an array of normals
glnormalpointerext IRIX define a array of normals
gluQuadricNormals Tru64 specify what kind of normals are desired for quadrics
gluquadricnormals IRIX specify what kind of normals are desired for quadrics
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service