public FMatrix(FPlane InX, FPlane InY, FPlane InZ, FPlane InW) { XPlane = InX; YPlane = InY; ZPlane = InZ; WPlane = InW; }
public FMatrix(EForceInit Init) { XPlane = new FPlane(); YPlane = new FPlane(); ZPlane = new FPlane(); WPlane = new FPlane(); SetIdentity(); }
/** * Calculate the projection of a point on the plane defined by counter-clockwise (CCW) points A,B,C. * * @param Point The point to project onto the plane * @param A 1st of three points in CCW order defining the plane * @param B 2nd of three points in CCW order defining the plane * @param C 3rd of three points in CCW order defining the plane * @return Projection of Point onto plane ABC */ public static FVector PointPlaneProject(FVector Point, FVector A, FVector B, FVector C) { //Compute the plane normal from ABC FPlane Plane = new FPlane(A, B, C); //Find the distance of X from the plane //Add the distance back along the normal from the point return(Point - Plane * Plane.PlaneDot(Point)); }
public FMatrix(FVector InX, FVector InY, FVector InZ, FVector InW) { XPlane = new FPlane(); YPlane = new FPlane(); ZPlane = new FPlane(); WPlane = new FPlane(); this[0, 0] = InX.X; this[0, 1] = InX.Y; this[0, 2] = InX.Z; this[0, 3] = 0.0f; this[1, 0] = InY.X; this[1, 1] = InY.Y; this[1, 2] = InY.Z; this[1, 3] = 0.0f; this[2, 0] = InZ.X; this[2, 1] = InZ.Y; this[2, 2] = InZ.Z; this[2, 3] = 0.0f; this[3, 0] = InW.X; this[3, 1] = InW.Y; this[3, 2] = InW.Z; this[3, 3] = 1.0f; }
/** @param OutPlane the bottom plane of the Frustum of this matrix */ public bool GetFrustumBottomPlane(out FPlane OutPlane) { return(GetFrustumBottomPlane(ref this, out OutPlane)); }
//[MethodImplAttribute(MethodImplOptions.InternalCall)] extern static bool GetFrustumBottomPlane(ref FMatrix This, out FPlane OutPlane);
/// <summary> /// Constructor /// </summary> /// <param name="srcProjMat">source projection matrix to premultiply with the clip matrix</param> /// <param name="plane">clipping plane used to build the clip matrix (assumed to be in camera space)</param> public FClipProjectionMatrix(FMatrix srcProjMat, FPlane plane) : base(E_CreateStruct_FClipProjectionMatrix_FMatrix_FPlane(srcProjMat, plane), false) { }
/// <summary> /// <para>Copy Constructor. </para> /// <param name="P">Plane to copy from. </param> /// </summary> public FPlane(FPlane p) : base(E_CreateStruct_FPlane_FPlane(p), false) { }
/// <summary> /// Constructor. Updated for the fact that our FPlane uses Ax+By+Cz=D. /// </summary> /// <param name="plane">source plane for mirroring (assumed normalized)</param> public FMirrorMatrix(FPlane plane) : base(E_CreateStruct_FMirrorMatrix_FPlane(plane), false) { }
/// <summary> /// <para>Copy Constructor. </para> /// <param name="P">Plane to copy from. </param> /// </summary> public FPlane(FPlane P) : base(E_CreateStruct_FPlane_FPlane(P), false) { }
/// <summary>Draws a debug plane.</summary> public extern static void DrawDebugPlane(UObject WorldContextObject, FPlane PlaneCoordinates, FVector Location, float Size, FLinearColor PlaneColor = default(FLinearColor), float Duration = 0.000000f);
/** * Calculate the projection of a point on the given plane. * * @param Point The point to project onto the plane * @param Plane The plane * @return Projection of Point onto Plane */ public static FVector PointPlaneProject(FVector Point, FPlane Plane) { return(Point - Plane * Plane.PlaneDot(Point)); }
/** * Mirrors a vector about a plane. * * @param Plane Plane to mirror about. * @return Mirrored vector. */ public FVector MirrorByPlane(FPlane Plane) { FPlane TempPlane = Plane * (2.0f * Plane.PlaneDot(this)); return(this - TempPlane);//new FVector(TempPlane.X,TempPlane.Y,TempPlane.Z); }
static extern bool GetFrustumTopPlane(ref FMatrix This, out FPlane OutPlane);