Struct SpawnPose
Immutable representation of a 3D position and rotation. Stores position as three floats and rotation as a quaternion (x, y, z, w). Pure C# — no engine dependencies.
Implements
Inherited Members
Namespace: Serenity.Stage.Domain.ValueObjects
Assembly: Serenity.Stage.Domain.dll
Syntax
public readonly struct SpawnPose : IEquatable<SpawnPose>
Constructors
SpawnPose(float, float, float, float, float, float, float)
Creates a new SpawnPose with the specified position and rotation.
Declaration
public SpawnPose(float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float rotW)
Parameters
| Type | Name | Description |
|---|---|---|
| float | posX | World X position. |
| float | posY | World Y position. |
| float | posZ | World Z position. |
| float | rotX | Quaternion X component. |
| float | rotY | Quaternion Y component. |
| float | rotZ | Quaternion Z component. |
| float | rotW | Quaternion W component. |
Fields
PositionX
World X position.
Declaration
public readonly float PositionX
Field Value
| Type | Description |
|---|---|
| float |
PositionY
World Y position.
Declaration
public readonly float PositionY
Field Value
| Type | Description |
|---|---|
| float |
PositionZ
World Z position.
Declaration
public readonly float PositionZ
Field Value
| Type | Description |
|---|---|
| float |
RotationW
Rotation quaternion W component.
Declaration
public readonly float RotationW
Field Value
| Type | Description |
|---|---|
| float |
RotationX
Rotation quaternion X component.
Declaration
public readonly float RotationX
Field Value
| Type | Description |
|---|---|
| float |
RotationY
Rotation quaternion Y component.
Declaration
public readonly float RotationY
Field Value
| Type | Description |
|---|---|
| float |
RotationZ
Rotation quaternion Z component.
Declaration
public readonly float RotationZ
Field Value
| Type | Description |
|---|---|
| float |
Methods
Equals(SpawnPose)
Declaration
public bool Equals(SpawnPose other)
Parameters
| Type | Name | Description |
|---|---|---|
| SpawnPose | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
FromPosition(float, float, float)
Creates a SpawnPose with only position (identity rotation).
Declaration
public static SpawnPose FromPosition(float x, float y, float z)
Parameters
| Type | Name | Description |
|---|---|---|
| float | x | World X position. |
| float | y | World Y position. |
| float | z | World Z position. |
Returns
| Type | Description |
|---|---|
| SpawnPose | A SpawnPose with the given position and identity rotation (0,0,0,1). |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
Operators
operator ==(SpawnPose, SpawnPose)
Declaration
public static bool operator ==(SpawnPose left, SpawnPose right)
Parameters
| Type | Name | Description |
|---|---|---|
| SpawnPose | left | |
| SpawnPose | right |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(SpawnPose, SpawnPose)
Declaration
public static bool operator !=(SpawnPose left, SpawnPose right)
Parameters
| Type | Name | Description |
|---|---|---|
| SpawnPose | left | |
| SpawnPose | right |
Returns
| Type | Description |
|---|---|
| bool |