HeightfieldColliderShapeDesc Class
Namespace: Stride.PhysicsAssembly: Stride.Physics.dll
[ContentSerializer(typeof(DataContentSerializer<HeightfieldColliderShapeDesc>))]
[DataContract("HeightfieldColliderShapeDesc")]
[Display(300, "Heightfield", null)]
public class HeightfieldColliderShapeDesc : IInlineColliderShapeDesc, IAssetColliderShapeDesc, IColliderShapeDesc
Name | Description | |
---|---|---|
Fields | ||
FlipQuadEdges | ||
LocalOffset | ||
LocalRotation | ||
Properties | ||
Centering | Add a value to local offset in order to center specific height. |
|
HeightStickArraySource | The source to initialize the height stick array. |
|
Methods | ||
CreateShape() | ||
GetCenteringOffset() | Get the centering offset that will be added to the local offset of the collider shape. |
|
GetCenteringOffset(Vector2, Single) | Get the offset required in order to center specific height. |
|
Match(Object) |
Fields
FlipQuadEdges
[DataMember(70)]
public bool FlipQuadEdges
Field Value
Type | Description |
---|---|
System.Boolean |
LocalOffset
[DataMember(100)]
public Vector3 LocalOffset
Field Value
Type | Description |
---|---|
Vector3 |
LocalRotation
[DataMember(110)]
public Quaternion LocalRotation
Field Value
Type | Description |
---|---|
Quaternion |
Properties
Centering
Add a value to local offset in order to center specific height.
[DataMember(80)]
public HeightfieldCenteringParameters Centering { get; set; }
Property Value
Type | Description |
---|---|
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
Type | Description |
---|---|
IHeightStickArraySource |
Methods
CreateShape()
public ColliderShape CreateShape()
Returns
Type | Description |
---|---|
ColliderShape |
GetCenteringOffset()
Get the centering offset that will be added to the local offset of the collider shape.
public float GetCenteringOffset()
Returns
Type | Description |
---|---|
System.Single | The value that will be added to the local offset of the collider shape in order to center specific height. |
GetCenteringOffset(Vector2, Single)
Get the offset required in order to center specific height.
public static float GetCenteringOffset(Vector2 heightRange, float centerHeight)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | heightRange | The range of the height. |
System.Single | centerHeight | The height to be centered. |
Returns
Type | Description |
---|---|
System.Single | The value in y axis required in order to center specific height. |
Match(Object)
public bool Match(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |