njGetPlaneNormal Japanese
<-|INDEX|->
Finds the vector that is normal to a plane.

FORMAT

#include <Ninja.h>
void njGetPlaneNormal(*p, *v)
NJS_POINT3 *p
NJS_VECTOR *v

PARAMETERS

NJS_POINT3 *p
data array describing three points in the plane
NJS_VECTOR *v
normal vector to the plane

RETURN VALUE

None

FUNCTION


EXAMPLE

The following finds the vector that is normal to the plane passing through points (1, 2, 3), (1, -1, 2), and (2, 3, 1).
NJS_POINT3 p[3];
NJS_VECTOR v;

p[0].x = 1.f;
p[0].y = 2.f;
p[0].z = 3.f;
p[1].x = 1.f;
p[1].y = -1,f;
p[1].z = 2.f;
p[2].x = 2.f;
p[2].y = 3.f;
p[2].z = 1.f;

njGetPlaneNormal(p, &v);

% Result %
v (7, -1, 3)

NOTES


RELATED TOPICS

NJS_POINT3
NJS_VECTOR

njGetPlaneNormal
<-|INDEX|->

Copyright SEGA ENTERPRISES, LTD., 1998