Table of Contents

Struct CGSpot

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

index int

CGSpot(int, Vector3, Quaternion, Vector3)

public CGSpot(int index, Vector3 position, Quaternion rotation, Vector3 scale)

Parameters

index int
position Vector3
rotation Quaternion
scale Vector3

Properties

Index

The index of the object to place

public int Index { get; }

Property Value

int

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

other CGSpot

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToTransform(Transform)

Sets a transform to match Position, Rotation, Scale in local space

public void ToTransform(Transform transform)

Parameters

transform Transform

Operators

operator ==(CGSpot, CGSpot)

public static bool operator ==(CGSpot left, CGSpot right)

Parameters

left CGSpot
right CGSpot

Returns

bool

operator !=(CGSpot, CGSpot)

public static bool operator !=(CGSpot left, CGSpot right)

Parameters

left CGSpot
right CGSpot

Returns

bool