GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
M_PLANE(3) FreeBSD Library Functions Manual M_PLANE(3)

M_Line
Agar-Math plane structure

#include <agar/math.h>

The M_Plane structure describes a plane in R^3 (Ax+By+Cz+D=0):
typedef struct m_plane {
	M_Vector3 n;		/* Normal vector */
	M_Real d;		/* Distance to origin */
} M_Plane;

The plane satisfies the equation A(n.x) + B(n.y) + C(n.z) = d.

M_Plane
M_PlaneFromPts(M_Vector3 p1, M_Vector p2, M_Vector p3);


M_Plane
M_PlaneFromParallel(M_Plane P, M_Real d);


M_Plane
M_PlaneRead(AG_DataSource *ds);


void
M_PlaneWrite(AG_DataSource *ds, M_Plane *P);


M_Plane
M_PLANE_INITIALIZER(M_Real a, M_Real b, M_Real c, M_Real d);

The M_PlaneFromPts() function returns a plane from three (non-colinear) points p1, p2 and p3. M_PlaneFromParallel() returns the parallel plane at distance d from the specified plane P.

The M_PlaneRead() and M_PlaneWrite() functions read or write a plane structure from/to an AG_DataSource(3).

The macro M_PLANE_INITIALIZER() expands to a static initializer for a M_Plane from the coefficients of the plane equation a, b, c, d.

M_Real
M_PlaneVectorAngle(M_Plane P, M_Vector3 v);

The M_PlaneVectorAngle() function computes the angle between the plane and specified vector, in radians.

AG_DataSource(3), AG_Intro(3), M_Circle(3), M_Geometry(3), M_Plane(3), M_Polygon(3), M_Rectangle(3), M_Sphere(3), M_Triangle(3), M_Vector(3)

The M_Line structure first appeared in Agar 1.3.4.
July 17, 2009 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.