コード例 #1
0
 public Point4D Transform(Point4D point)
 {
     MultiplyPoint(ref point);
     return(point);
 }
コード例 #2
0
ファイル: Point4D.cs プロジェクト: tgjones/nexus
 public static Point4D LinearInterpolate(Point4D value1, Point4D value2, float amountRangeStart, float amountRangeEnd, float amount)
 {
     Point4D result = new Point4D();
     result.X = MathUtility.Lerp(value1.X, value2.X, amountRangeStart, amountRangeEnd, amount);
     result.Y = MathUtility.Lerp(value1.Y, value2.Y, amountRangeStart, amountRangeEnd, amount);
     result.Z = MathUtility.Lerp(value1.Z, value2.Z, amountRangeStart, amountRangeEnd, amount);
     result.W = MathUtility.Lerp(value1.W, value2.W, amountRangeStart, amountRangeEnd, amount);
     return result;
 }
コード例 #3
0
ファイル: Point4D.cs プロジェクト: tgjones/nexus
 public static Point4D Parse(string source)
 {
     IFormatProvider cultureInfo = CultureInfo.InvariantCulture;
     TokenizerHelper helper = new TokenizerHelper(source, cultureInfo);
     string str = helper.NextTokenRequired();
     Point4D pointd = new Point4D(Convert.ToSingle(str, cultureInfo), Convert.ToSingle(helper.NextTokenRequired(), cultureInfo), Convert.ToSingle(helper.NextTokenRequired(), cultureInfo), Convert.ToSingle(helper.NextTokenRequired(), cultureInfo));
     helper.LastTokenRequired();
     return pointd;
 }
コード例 #4
0
ファイル: Point4D.cs プロジェクト: tgjones/nexus
 public static Point4D PerspectiveInterpolate(Point4D value1, Point4D value2, float w1, float w2, float amountRangeStart, float amountRangeEnd, float amount)
 {
     Point4D result = new Point4D();
     result.X = MathUtility.PerspectiveInterpolate(value1.X, value2.X, w1, w2, amountRangeStart, amountRangeEnd, amount);
     result.Y = MathUtility.PerspectiveInterpolate(value1.Y, value2.Y, w1, w2, amountRangeStart, amountRangeEnd, amount);
     result.Z = MathUtility.PerspectiveInterpolate(value1.Z, value2.Z, w1, w2, amountRangeStart, amountRangeEnd, amount);
     result.W = MathUtility.PerspectiveInterpolate(value1.W, value2.W, w1, w2, amountRangeStart, amountRangeEnd, amount);
     return result;
 }
コード例 #5
0
 public VertexTransformedPositionTexture(Point4D position, Point2D textureCoordinate)
 {
     Position = position;
     TextureCoordinate = textureCoordinate;
 }