Пример #1
0
 /// <summary>
 /// Scales the plane with a given scaling factor.
 /// </summary>
 /// <param name="p">Pointer to the source TGCPlane.</param>
 /// <param name="s">Scale factor.</param>
 /// <returns>The Plane structure that represents the scaled plane.</returns>
 public static TGCPlane Scale(TGCPlane p, float s)
 {
     return(new TGCPlane(Plane.Scale(p.ToPlane(), s)));
 }
Пример #2
0
 /// <summary>
 /// Transforms a plane by a matrix.
 /// </summary>
 /// <param name="p">Input TGCPlane, which contains the plane to be transformed. The vector (a,b,c) that describes the plane must be normalized before this method is called.</param>
 /// <param name="m">Source TGCMatrix, which contains the transformation values. This matrix must contain the inverse transpose of the transformation values.</param>
 /// <returns>A TGCPlane that represents the transformed plane.</returns>
 public static TGCPlane Transform(TGCPlane p, TGCMatrix m)
 {
     return(new TGCPlane(Plane.Transform(p.ToPlane(), m.ToMatrix())));
 }
Пример #3
0
 /// <summary>
 /// Returns the normal of a plane.
 /// </summary>
 /// <param name="p">Source TGCPlane.</param>
 /// <returns>A TGCPlane that represents the normal of the plane.</returns>
 public static TGCPlane Normalize(TGCPlane p)
 {
     return(new TGCPlane(Plane.Normalize(p.ToPlane())));
 }
Пример #4
0
 /// <summary>
 /// Finds the intersection between a plane and a line.
 /// </summary>
 /// <param name="p">Source TGCPlane.</param>
 /// <param name="v1">Source TGCVector3 that defines a line starting point.</param>
 /// <param name="v2">Source TGCVector3 that defines a line ending point.</param>
 /// <returns>A TGCVector3 that is the intersection between the specified plane and line.</returns>
 public static TGCVector3 IntersectLine(TGCPlane p, TGCVector3 v1, TGCVector3 v2)
 {
     return(new TGCVector3(Plane.IntersectLine(p.ToPlane(), v1, v2)));
 }
Пример #5
0
 /// <summary>
 /// Computes the dot product of a plane and a 3-D vector. The w parameter of the vector is assumed to be 0.
 /// </summary>
 /// <param name="p">Source TGCPlane.</param>
 /// <param name="v">Source TGCVector3.</param>
 /// <returns>A Single value that represents the dot product of the plane and the 3-D vector.</returns>
 public static float DotNormal(TGCPlane p, TGCVector3 v)
 {
     return(Plane.DotNormal(p.ToPlane(), v));
 }
Пример #6
0
 /// <summary>
 /// Builds a matrix that flattens geometry into a plane.
 /// </summary>
 /// <param name="light">A Vector4 structure that describes the light's position.</param>
 /// <param name="plane">Source TGCPlane structure.</param>
 public void Shadow(TGCVector4 light, TGCPlane plane)
 {
     this.dxMatrix.Shadow(light, plane);
 }
Пример #7
0
 /// <summary>
 /// Builds a matrix that reflects the coordinate system about a plane.
 /// </summary>
 /// <param name="plane">Source TGCPlane structure.</param>
 public void Reflect(TGCPlane plane)
 {
     this.dxMatrix.Reflect(plane);
 }