public bool Equals(RtVector other) { return(other.X.ApproximateEquals(X) && other.Y.ApproximateEquals(Y) && other.Z.ApproximateEquals(Z) && other.W.ApproximateEquals(W)); }
public Triangle(RtPoint point1, RtPoint point2, RtPoint point3, RtVector normal1, RtVector normal2, RtVector normal3) { Point1 = point1; Point2 = point2; Point3 = point3; Normal1 = normal1; Normal2 = normal2; Normal3 = normal3; }
public RtVector NormalToWorld(RtVector normal) { normal = RtMatrix.Transpose(Transform.Inverse()) * normal; normal = normal.Normalize(); if (Parent != null) { normal = Parent.NormalToWorld(normal); } return(normal); }
public AreaLight(RtPoint corner, RtVector uVector, int uSteps, RtVector vVector, int vSteps, RtColor intensity) { Corner = corner; UVector = uVector / uSteps; USteps = uSteps; VVector = vVector / vSteps; VSteps = vSteps; Intensity = intensity; var middle = (uVector / 2) + (vVector / 2); Position = new RtPoint(middle.X, middle.Y, middle.Z); Samples = uSteps * vSteps; }
public Ray(RtPoint origin, RtVector direction) { Origin = origin; Direction = direction; }