# Uses of Class
javajs.util.P4

Packages that use P4
Package
Description
javajs.util
org.jmol.jvxl.calc
org.jmol.jvxl.data
org.jmol.jvxl.readers
org.jmol.modelset
org.jmol.render
org.jmol.script
org.jmol.shape
org.jmol.util
org.jmol.viewer

## Uses of P4 in javajs.util

Methods in javajs.util that return P4
Modifier and Type
Method
Description
`static P4`
Measure.`getPlaneThroughPoints(T3 pointA, T3 pointB, T3 pointC, V3 vNorm, V3 vAB, P4 plane)`
`P4`
Quat.`getThetaDirected(P4 axisAngle)`
`static P4`
P4.`new4(float x, float y, float z, float w)`
`static P4`
P4.`newPt(P4 value)`
`P4`
Quat.`toPoint4f()`
Quaternions are saved as {q1, q2, q3, q0} While this may seem odd, it is so that for any point4 -- planes, axisangles, and quaternions -- we can use the first three coordinates to determine the relavent axis the fourth then gives us offset to {0,0,0} (plane), rotation angle (axisangle), and cos(theta/2) (quaternion).
Methods in javajs.util with parameters of type P4
Modifier and Type
Method
Description
`static float`
Measure.`calcBestPlaneThroughPoints(P3[] points, int nPoints, P4 plane)`
Calculate the best ax + by + cz + d = 0 plane through a number of points using a three-step check for the best plane based on normal distance.
`static float`
Measure.`calcPlaneForMode(P3[] points, int nPoints, P4 plane, char mode)`
Compact calculation of the best pane using a simple method discussed at https://stackoverflow.com/questions/12299540/plane-fitting-to-4-or-more-xyz-points (A^T A)^-1 A^T B run three times to ensure that at least one is not perpendicular.
`static float`
Measure.`directedDistanceToPlane(P3 pt, P4 plane, P3 ptref)`
`final float`
P4.`distance4(P4 p1)`
Returns the distance between this point and point p1.
`static float`
Measure.`distanceToPlane(P4 plane, T3 pt)`
`static float`
Measure.`distanceToPlaneD(P4 plane, float d, P3 pt)`
`static void`
Measure.`getBisectingPlane(P3 pointA, V3 vAB, T3 ptTemp, V3 vTemp, P4 plane)`
`static P3`
Measure.`getIntersection(P3 pt1, V3 v, P4 plane, P3 ptRet, V3 tempNorm, V3 vTemp)`
Calculate the intersection of a line with a plane.
`static Lst<Object>`
Measure.`getIntersectionPP(P4 plane1, P4 plane2)`
Calculate the line that is the intersection of two planes.
`static float`
Measure.`getPlaneProjection(T3 pt, P4 plane, T3 retPtProj, V3 retNorm)`
Project a point onto a plane, also returning the normal vector and the directed distance to the plane.
`static void`
Measure.`getPlaneThroughPoint(T3 pt, V3 normal, P4 plane)`
`static P4`
Measure.`getPlaneThroughPoints(T3 pointA, T3 pointB, T3 pointC, V3 vNorm, V3 vAB, P4 plane)`
`static Lst<P3>`
Measure.`getPointsOnPlane(P3[] pts, P4 plane)`
Based on a set of centering points, returns the list of points on a given plane.
`P4`
Quat.`getThetaDirected(P4 axisAngle)`
`static boolean`
Measure.`isInTetrahedron(P3 pt, P3 ptA, P3 ptB, P3 ptC, P3 ptD, P4 plane, V3 vTemp, V3 vTemp2, boolean fullyEnclosed)`
`static Quat`
Quat.`newP4(P4 pt)`
`static P4`
P4.`newPt(P4 value)`

## Uses of P4 in org.jmol.jvxl.calc

Constructors in org.jmol.jvxl.calc with parameters of type P4
Modifier
Constructor
Description
``
`MarchingSquares(VertexDataServer surfaceReader, VolumeData volumeData, P4 thePlane, float[] contoursDiscrete, int nContours, int thisContour, boolean contourFromZero)`

## Uses of P4 in org.jmol.jvxl.data

Fields in org.jmol.jvxl.data declared as P4
Modifier and Type
Field
Description
`P4`
JvxlData.`jvxlPlane`
`P4`
VolumeData.`mappingPlane`
Methods in org.jmol.jvxl.data with parameters of type P4
Modifier and Type
Method
Description
`void`
VolumeData.`capData(P4 plane, float cutoff)`
`void`
VolumeData.`setDataDistanceToPlane(P4 plane)`
`void`
VolumeData.`setMappingPlane(P4 plane)`
`void`
VolumeData.`setPlaneParameters(P4 plane)`
`void`
JvxlData.`setSurfaceInfo(P4 thePlane, P3 mapLattice, int nSurfaceInts, String surfaceData)`
`void`
JvxlData.`setSurfaceInfoFromBitSet(BS bs, P4 thePlane)`
`void`
JvxlData.`setSurfaceInfoFromBitSetPts(BS bs, P4 thePlane, P3 mapLattice)`

## Uses of P4 in org.jmol.jvxl.readers

Fields in org.jmol.jvxl.readers declared as P4
Modifier and Type
Field
Description
`P4`
Parameters.`thePlane`

## Uses of P4 in org.jmol.modelset

Methods in org.jmol.modelset with parameters of type P4
Modifier and Type
Method
Description
`BS`
AtomCollection.`getAtomsNearPlane(float distance, P4 plane)`
`void`
ModelSet.`invertSelected(P3 pt, P4 plane, int iAtom, BS bsAtoms)`
Carries out a stereochemical inversion through a point, across a plane, or at a chirality center.

## Uses of P4 in org.jmol.render

Fields in org.jmol.render declared as P4
Modifier and Type
Field
Description
`protected P4`
MeshRenderer.`thePlane`

## Uses of P4 in org.jmol.script

Methods in org.jmol.script that return P4
Modifier and Type
Method
Description
`P4`
ScriptParam.`getHklPlane(T3 pt, float offset, Lst<P3> pts)`
`protected P4`
ScriptEval.`getPlaneForObject(String id, V3 vAB)`
`P4`
ScriptParam.`getPoint4f(int i)`
`P4`
ScriptParam.`getPoint4fNoError(int i)`
`P4`
ScriptParam.`hklParameter(int i, Lst<P3> pts, boolean allowOffset)`
`P4`
ScriptParam.`planeParameter(int i, boolean isBest)`
`P4`
ScriptParam.`planeValue(T x)`
`static P4`
SV.`pt4Value(SV x)`
`P4`
ScriptParam.`xyzpParameter(int index)`
Methods in org.jmol.script with parameters of type P4
Modifier and Type
Method
Description
`boolean`
ScriptMathProcessor.`addXPt4(P4 pt)`

## Uses of P4 in org.jmol.shape

Methods in org.jmol.shape with parameters of type P4
Modifier and Type
Method
Description
`V3[]`
Mesh.`getNormals(T3[] vertices, P4 plane)`
`P3[]`
Mesh.`getOffsetVertices(P4 thePlane)`
`void`
Mesh.`initialize(int lighting, T3[] vertices, P4 plane)`

## Uses of P4 in org.jmol.util

Fields in org.jmol.util with type parameters of type P4
Modifier and Type
Field
Description
`protected Lst<P4>`
BZone.`newPlanes`
Methods in org.jmol.util that return P4
Modifier and Type
Method
Description
`static P4[]`
BoxInfo.`getBoxFacesFromOABC(P3[] oabc)`
`static P4`
SimpleUnitCell.`ptToIJK(T3 pt, int scale)`
Convert user's {3 2 1} to {1500500500, 1503502501, 0 or 1, 1500501}
Methods in org.jmol.util with parameters of type P4
Modifier and Type
Method
Description
`void`
BZone.`drawHKL(Viewer vwr, String id, P4 plane, P3[] pts)`
`static String`
Escape.`eP4(P4 x)`
`void`
MeshSlicer.`getIntersection(float distance, P4 plane, P3[] ptCenters, Lst<P3[]> vData, float[] fData, BS bsSource, MeshSurface meshSurface, boolean andCap, boolean doClean, int tokType, boolean isGhost)`
`Lst<Object>`
Triangulator.`intersectPlane(P4 plane, T3[] vertices, int flags)`
a generic cell - plane intersector -- used for finding the plane through a not static so as to allow JavaScript to not load it as core.

## Uses of P4 in org.jmol.viewer

Methods in org.jmol.viewer with parameters of type P4
Modifier and Type
Method
Description
`void`
Viewer.`invertAtomCoord(P3 pt, P4 plane, BS bs, int ringAtomIndex, boolean isClick)`
`void`
Viewer.`invertSelected(P3 pt, P4 plane, int iAtom, BS bsAtoms)`
`void`
TransformManager.`slabInternal(P4 plane, boolean isDepth)`