SubDComponentParameter
References[StructLayout(LayoutKind.Sequential)]
public struct SubDComponentParameter : IEquatable<SubDComponentParameter>
Identifies a point on the surface of a SubD.
SubDs have no global (u,v) parameterization. Instead a point on the surface is identified relative to a component of the SubD: a vertex, a point on an edge, or a point inside a face. A point inside a face is given by the index of the face corner it belongs to plus two parameters inside that corner, because a face with five or more sides has no single well behaved (u,v) domain.
Use SubD.ClosestPoint(Point3d, Point3d, SubDComponentParameter) to find a parameter and SubD.Evaluate(SubDComponentParameter, Point3d) and its overloads to evaluate one.
Properties
Gets the id of the face this parameter uses to resolve which sector of a vertex or which side of an edge it means, or 0 if there is none. It is always 0 when IsFaceParameter is true; use ComponentId in that case.
Gets the id of the SubD component this parameter is relative to, or 0 if this parameter is not set.
Gets the component index of the SubD component this parameter is relative to. It is ComponentIndex.Unset if this parameter is not set.
Gets a value between 0 and 1 identifying a point on the edge, or double.NaN if IsEdgeParameter is false.
Gets the index of the face corner the face parameters are measured in, or -1 if IsFaceParameter is false.
Gets the two parameters inside the face corner identified by FaceCornerIndex. Both run from 0 to 1/2: (0,0) is the corner vertex and (1/2,1/2) is the center of the face. X runs towards the midpoint of the edge leaving the corner and Y towards the midpoint of the edge entering it. The point is Point2d.Unset if IsFaceParameter is false.
Gets the number of edges of the face, or 0 if IsFaceParameter is false.
Gets true if this parameter identifies a surface point on a SubD edge.
Gets true if this parameter identifies a surface point inside a SubD face.
Gets true if this parameter identifies the surface point at a SubD vertex.
The unset parameter. It does not identify a point on any SubD.
Methods
[CLSCompliant(false)]
public static SubDComponentParameter CreateEdgeParameter(uint edgeId, double edgeParameter, uint activeFaceId)
Creates a parameter that identifies a surface point on a SubD edge.
[CLSCompliant(false)]
public static SubDComponentParameter CreateFaceParameter(uint faceId, int faceEdgeCount, int cornerIndex, double cornerS, double cornerT)
Creates a parameter that identifies a surface point inside a SubD face.
Remarks: (0,0) is the corner vertex and (1/2,1/2) is the center of the face.
Parameters:
| faceId (uint) | The id of a SubD face. |
| faceEdgeCount (int) | The number of edges of the face. Must be 3 or more. |
| cornerIndex (int) | The index of the face corner the parameters are measured in. Must be less than faceEdgeCount. |
| cornerS (double) | A value between 0 and 1/2 measured from the corner vertex towards the midpoint of the edge that leaves the corner. |
| cornerT (double) | A value between 0 and 1/2 measured from the corner vertex towards the midpoint of the edge that enters the corner. |
[CLSCompliant(false)]
public static SubDComponentParameter CreateVertexParameter(uint vertexId, uint activeFaceId)
Creates a parameter that identifies the surface point at a SubD vertex.
Equals
#Indicates whether this instance and a specified object are equal.
Parameters:
| obj (object) | The object to compare with the current instance. |
Returns:
true if obj and this instance are the same type and represent the same value; otherwise, false.Overrides: ValueType.Equals
Indicates whether the current object is equal to another object of the same type.
Parameters:
| other (SubDComponentParameter) | An object to compare with this object. |
Returns:
true if the current object is equal to the other parameter; otherwise, false.GetHashCode
#Returns the hash code for this instance.
Returns: A 32-bit signed integer that is the hash code for this instance.
Overrides: ValueType.GetHashCode
ToString
#Returns the fully qualified type name of this instance.
Returns: The fully qualified type name.
Overrides: ValueType.ToString
Operators
| Operation | Result | Description | ||
|---|---|---|---|---|
| SubDComponentParameter | == | SubDComponentParameter | bool | Determines whether two parameters are equal. |
| SubDComponentParameter | != | SubDComponentParameter | bool | Determines whether two parameters are different. |