fg_3Dlookat()

Win32 DirectX Fastgraph/Light

Prototype

int fg_3Dlookat (double x1, double y1, double z1, double x2, double y2, double z2);

Function fg_3Dlookat (ByVal x1 As Double, ByVal y1 As Double, ByVal z1 As Double, ByVal x2 As Double, ByVal y2 As Double, ByVal z2 As Double) As Long

function fg_3Dlookat (x1, y1, z1, x2, y2, z2 : double) : integer;

Description

The fg_3Dlookat() function defines the viewer's position and orientation in 3D world space. The orientation is defined by specifying the 3D world space point at which the viewer is looking.

Parameters

x1 is the x coordinate of the viewer's position in 3D world space.

y1 is the y coordinate of the viewer's position in 3D world space.

z1 is the z coordinate of the viewer's position in 3D world space.

x2 is the x coordinate of the point the viewer is looking at in 3D world space.

y2 is the y coordinate of the point the viewer is looking at in 3D world space.

z2 is the z coordinate of the point the viewer is looking at in 3D world space.

Return value

If successful, fg_3Dlookat() returns zero. It returns -1 if the two sets of points are too close together.

Restrictions

none

See also

fg_3Daxisangle(), fg_3Dmove(), fg_3Dmoveforward(), fg_3Dmoveright(), fg_3Dmoveup(), fg_3Dpov(), fg_3Droll(), fg_3Drotate(), fg_3Drotateright(), fg_3Drotateup()

Examples

Columns, Tunnel

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.