예제 #1
0
 /**
  * Constructor.
  *
  * @param V 4D vector to set up plane.
  */
 public FPlane(FVector4 V)
 {
     X = V.X;
     Y = V.Y;
     Z = V.Z;
     W = V.W;
 }
 public FApexClothPhysToRenderVertData(FAssetArchive Ar)
 {
     PositionBaryCoordsAndDist = Ar.Read <FVector4>();
     NormalBaryCoordsAndDist   = Ar.Read <FVector4>();
     TangentBaryCoordsAndDist  = Ar.Read <FVector4>();
     SimulMeshVertIndices      = Ar.ReadArray(4, Ar.Read <short>);
     Padding = Ar.ReadArray(2, Ar.Read <int>);
 }
예제 #3
0
        public FPaintedVertex(FArchive Ar)
        {
            Position = Ar.Read <FVector>();

            if (FRenderingObjectVersion.Get(Ar) < FRenderingObjectVersion.Type.IncreaseNormalPrecision)
            {
                var temp = new FPackedNormal(Ar);
                Normal = temp;
            }
            else
            {
                Normal = Ar.Read <FVector4>();
            }

            Color = Ar.Read <FColor>();
        }
예제 #4
0
        public FModelVertex(FArchive Ar)
        {
            Position = Ar.Read <FVector>();

            if (FRenderingObjectVersion.Get(Ar) < FRenderingObjectVersion.Type.IncreaseNormalPrecision)
            {
                TangentX = (FVector)Ar.Read <FDeprecatedSerializedPackedNormal>();
                TangentZ = (FVector4)Ar.Read <FDeprecatedSerializedPackedNormal>();
            }
            else
            {
                TangentX = Ar.Read <FVector>();
                TangentZ = Ar.Read <FVector4>();
            }

            TexCoord       = Ar.Read <FVector2D>();
            ShadowTexCoord = Ar.Read <FVector2D>();
        }
예제 #5
0
        public FMeshToMeshVertData(FArchive Ar)
        {
            PositionBaryCoordsAndDist = Ar.Read <FVector4>();
            NormalBaryCoordsAndDist   = Ar.Read <FVector4>();
            TangentBaryCoordsAndDist  = Ar.Read <FVector4>();
            SourceMeshVertIndices     = Ar.ReadArray <short>(4);

            if (FReleaseObjectVersion.Get(Ar) < FReleaseObjectVersion.Type.WeightFMeshToMeshVertData)
            {
                // Old version had "uint32 Padding[2]"
                var discard = Ar.Read <uint>();
                Padding = Ar.Read <uint>();
            }
            else
            {
                // New version has "float Weight and "uint32 Padding"
                Weight  = Ar.Read <float>();
                Padding = Ar.Read <uint>();
            }
        }
예제 #6
0
 public FPackedNormal(FVector4 Vector)
 {
     Data = (uint)((int)(Vector.X + 1 * 127.5) + (int)(Vector.Y + 1 * 127.5) << 8 + (int)(Vector.Z + 1 * 127.5) << 16 + (int)(Vector.W + 1 * 127.5) << 24);
 }
예제 #7
0
 public static FVector4 VectorMultiplyAdd(FVector4 vec1, FVector4 vec2, FVector4 vec3) =>
예제 #8
0
 public FPackedNormal(FVector4 vector)// is this broken?
 {
     Data = (uint)((int)(vector.X + 1 * 127.5) + (int)(vector.Y + 1 * 127.5) << 8 + (int)(vector.Z + 1 * 127.5) << 16 + (int)(vector.W + 1 * 127.5) << 24);
 }