Struct CGSpot
- Namespace
- FluffyUnderware.Curvy.Generator
Spots are used to place objects (like meshes or Game Objects) A spot is defined by spacial coordinates (similar to Transform) and the index of the object to place
[Serializable]
public struct CGSpot
Constructors
CGSpot(int)
public CGSpot(int index)
Parameters
indexint
CGSpot(int, Vector3, Quaternion, Vector3)
public CGSpot(int index, Vector3 position, Quaternion rotation, Vector3 scale)
Parameters
indexintpositionVector3rotationQuaternionscaleVector3
Properties
Index
The index of the object to place
public int Index { get; }
Property Value
Matrix
Gets a TRS matrix using Position, Rotation, Scale
public Matrix4x4 Matrix { get; }
Property Value
- Matrix4x4
Position
Gets or sets the position
public Vector3 Position { get; set; }
Property Value
- Vector3
Rotation
Gets or sets the rotation
public Quaternion Rotation { get; set; }
Property Value
- Quaternion
Scale
Gets or sets the scale
public Vector3 Scale { get; set; }
Property Value
- Vector3
Methods
Equals(CGSpot)
public bool Equals(CGSpot other)
Parameters
otherCGSpot
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToTransform(Transform)
Sets a transform to match Position, Rotation, Scale in local space
public void ToTransform(Transform transform)
Parameters
transformTransform
Operators
operator ==(CGSpot, CGSpot)
public static bool operator ==(CGSpot left, CGSpot right)
Parameters
Returns
operator !=(CGSpot, CGSpot)
public static bool operator !=(CGSpot left, CGSpot right)