Table of Contents

Class HeightfieldColliderShapeDesc

Namespace
Stride.Physics
Assembly
Stride.Physics.dll
[ContentSerializer(typeof(DataContentSerializer<HeightfieldColliderShapeDesc>))]
[DataContract("HeightfieldColliderShapeDesc")]
[Display(300, "Heightfield", null)]
public class HeightfieldColliderShapeDesc : IInlineColliderShapeDesc, IAssetColliderShapeDesc, IColliderShapeDesc
Inheritance
HeightfieldColliderShapeDesc
Implements

Fields

FlipQuadEdges

[DataMember(70)]
public bool FlipQuadEdges

Field Value

bool

LocalOffset

[DataMember(100)]
public Vector3 LocalOffset

Field Value

Vector3

LocalRotation

[DataMember(110)]
public Quaternion LocalRotation

Field Value

Quaternion

Properties

Centering

Add a value to local offset in order to center specific height.

[DataMember(80)]
public HeightfieldCenteringParameters Centering { get; set; }

Property Value

HeightfieldCenteringParameters

Remarks

NOTE: The center height is the middle point of the range, if this is disabled with asymmetrical range.

HeightStickArraySource

The source to initialize the height stick array.

[DataMember(10)]
[Display("Source", null, Expand = ExpandRule.Always)]
public IHeightStickArraySource HeightStickArraySource { get; set; }

Property Value

IHeightStickArraySource

Methods

CreateShape(IServiceRegistry)

public ColliderShape CreateShape(IServiceRegistry services)

Parameters

services IServiceRegistry

Returns

ColliderShape

GetCenteringOffset()

Get the centering offset that will be added to the local offset of the collider shape.

public float GetCenteringOffset()

Returns

float

The value that will be added to the local offset of the collider shape in order to center specific height.

GetCenteringOffset(Vector2, float)

Get the offset required in order to center specific height.

public static float GetCenteringOffset(Vector2 heightRange, float centerHeight)

Parameters

heightRange Vector2

The range of the height.

centerHeight float

The height to be centered.

Returns

float

The value in y axis required in order to center specific height.

Match(object)

public bool Match(object obj)

Parameters

obj object

Returns

bool