[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.5.3 Geometry, Matrices and Colors

float xcomp ( point Pt )
float ycomp ( point Pt )
float zcomp ( point Pt )
void setxcomp ( output point Pt; float x )
void setycomp ( output point Pt; float y )
void setzcomp ( output point Pt; float z )

float comp ( matrix M; float row, col )
Returns M[row,col].

void setcomp ( output matrix M; float row, col, x )
M[row,col] = x.

float comp ( color c; float i )

void setcomp ( output color c, float i, x )

point transform ( string [fromspace,] tospace; point Pt )
point transform ( [string fromspace;] matrix M; point Pt )
vector vtransform ( string [fromspace,] tospace; vector V )
vector vtransform ( [string fromspace;] matrix M; vector V )
normal ntransform ( string [fromspace,] tospace; normal Nr )
normal ntransform ( [string fromspace;] matrix M; normal Nr )
Transform a point, vector or normal from some given space (fromspace) to another space (tospace). If the optional fromspace is not given, it is assumed to be the `current' space.

color ctransform ( string [fromspace,] tospace; color src_color )
Transforms color src_color from color space fromspace to color space tospace. If the optional fromspace is not specified, it is assumed to be `rgb'. 3Delight knows about the following color spaces: RGB, HSV, HSL, YIQ and XYZ(18). If an unknown color space is given, 3Delight will return src_color.

float distance ( point Pt1, Pt2 )
float length ( vector V )
vector normalize ( vector V )

float ptlined ( point Pt1, Pt2, Q )
Returns minimum distance between a point Q and a line segment defined by Pt1, Pt2.

point rotate ( point Q; float angle; point Pt1, Pt2 )
Rotates a point Q around the line defined by Pt1, Pt2 by a given angle. New point position is returned. Note that angle is assumed to be in radians.

float area ( point Pt )
Returns length(Du(Pt)^Dv(Pt)), which is approximatly the area of one micro-polygon on the surface defined by Pt.

vector faceforward ( vector N, I[, Nref] )
Flip N, if needed, so it faces in the direction opposite to I. Nref gives the element surface normal; if not provided, NRef will be set to Ng.

vector reflect ( vector I, N )

vector refract ( vector I, Nr; float eta )
Returns the refracted vector for the incoming vector I, surface normal Nr and index of refraction ratio eta.

float depth ( point Pt )
Returns the normalized z coordinate of Pt in camera space. Return value is in the range [0..1] (0=near clipping plane, 1=far clipping plane). Pt is assumed to be defined in `current' space.

normal calculatenormal ( point Pt )
Use this function to compute the normal of a surface defined by Pt. Often used after a displacement operation. Equivalent to Du(Pt)^Dv(Pt), but faster.

float determinent ( matrix M )
matrix translate ( matrix M; point Tr )
matrix rotate ( matrix M; float angle; vector axis )
matrix scale ( matrix M; point Sc )
Basic matrix operations. The angle parameter passed to rotate() is assumed to be in radians.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Aghiles Kheffache on July, 31 2003 using texi2html
3Delight 1.0.0. Copyright 2000-2003 The 3Delight Team. All Rights Reserved.