Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Struct: RT.Modeling.Pt

Summary

Encapsulates a point in 3D space or a 3D vector.

Constructors

Pt(double x, double y, double z)
Constructor.

Instance methods

Pt
Add(double x = 0, double y = 0, double z = 0)
Moves this point/vector by the specified amount in 3D space.
double
Distance(Pt other)
Calculates the distance between two points in 3D space. (see also remarks)
double
Dot(Pt other)
Calculates the vector dot product.
bool
Equals(object obj)
  • Overrides: object.Equals(object)
Refer to the documentation for object.Equals.
bool
Equals(Pt other)
  • Implements: IEquatable<Pt>.Equals(Pt)
Refer to the documentation for IEquatable<Pt>.Equals.
double[]
GetCameraMatrix(Pt lookingAt, Pt? up = null)
Returns a 3×3 matrix that describes a linear transform that will rotate objects in accordance with the orientation of the camera. This can be passed to Pt.ProjectOntoCamera(Pt, double[]) to project 3D objects into a 2D representation.
int
  • Overrides: object.GetHashCode()
Refer to the documentation for object.GetHashCode.
PtScales this vector to make its length equal to 1 (or returns the same vector if it is zero).
PointD
ProjectOntoCamera(Pt cameraPosition, double[] cameraMatrix)
Projects a point onto a 2D canvas using a linear-transformation matrix.
PointD
ProjectOntoCamera(Pt cameraPosition, Pt cameraLookingAt, Pt? cameraUp = null)
Projects a point onto a camera.
Pt
ProjectOntoPlane(Pt planeNormal)
Projects this vector onto the plane that has the specified normal vector.
Pt
Rotate(Pt axisStart, Pt axisEnd, double angle)
Rotates this point counter-clockwise about the specified axis by the specified angle in degrees.
Pt
Scale(double x = 1, double y = 1, double z = 1)
Scales (stretches or shrinks) this point/vector along each axis by the specified multiplicative factors.
Pt
ScaleX(double x)
Scales (stretches or shrinks) this point/vector along the x-axis by the specified multiplicative factor.
Pt
ScaleY(double y)
Scales (stretches or shrinks) this point/vector along the y-axis by the specified multiplicative factor.
Pt
ScaleZ(double z)
Scales (stretches or shrinks) this point/vector along the z-axis by the specified multiplicative factor.
Pt
Set(double? x = null, double? y = null, double? z = null)
Overrides some of the specific coordinates of this point/vector.
string
  • Overrides: object.ToString()
Refer to the documentation for object.ToString.
MeshVertexInfoConverts this point to a MeshVertexInfo with the specified normal vector.
MeshVertexInfo
WithMeshInfo(double normalX, double normalY, double normalZ)
MeshVertexInfo
WithMeshInfo(Normal befX, Normal afX, Normal befY, Normal afY)
Converts this point to a MeshVertexInfo with the specified normal vector instructions.
VertexInfo
WithNormal(Pt normal)
Converts this point to a vertex with the specified normal vector.
VertexInfo
WithNormal(double x, double y, double z)
VertexInfoConverts this point to a vertex with the specified texture coordinates (UV mapping).
VertexInfo
WithTexture(double x, double y)

Operators

Pt
operator+(Pt one, Pt two)
Adds two vectors.
Pt
operator/(Pt one, double two)
Divides a vector by a scalar.
bool
operator==(Pt one, Pt two)
Compares two points/vectors for equality.
bool
operator!=(Pt one, Pt two)
Compares two points/vectors for inequality.
Pt
operator*(Pt one, double two)
Multiplies a vector by a scalar.
Pt
operator*(double one, Pt two)
PtCalculates the vector cross product.
Pt
operator*(double[] matrix, Pt p)
Multiplies a 3D point/vector by a matrix.
Pt
operator-(Pt one, Pt two)
Subtracts a vector from another.
PtNegates a vector.

Static properties

PtThe origin point of the 3D coordinate space.
PtThe unit vector in the direction of the x-axis.
PtThe unit vector in the direction of the y-axis.
PtThe unit vector in the direction of the z-axis.

Instance properties

boolDetermines if this point/vector is all zeros.
doubleReturns the length of the vector, or this point’s distance from the origin.

Instance fields

doubleX-coordinate.
doubleY-coordinate.
doubleZ-coordinate.