T - Type of vector, either 2D or 3D, implementing the Vector interfacepublic class ParallelSideRayConfiguration<T extends com.badlogic.gdx.math.Vector<T>> extends RayConfigurationBase<T>
ParallelSideRayConfiguration uses two rays parallel to the direction of motion. The rays have the same length and
opposite side offset.
The parallel configuration works well in areas where corners are highly obtuse but is very susceptible to the corner trap.
owner, rays| Constructor and Description |
|---|
ParallelSideRayConfiguration(Steerable<T> owner,
float length,
float sideOffset)
Creates a
ParallelSideRayConfiguration for the given owner where the two rays have the specified length and side
offset. |
| Modifier and Type | Method and Description |
|---|---|
float |
getLength()
Returns the length of the rays.
|
float |
getSideOffset()
Returns the side offset of the rays.
|
void |
setLength(float length)
Sets the length of the rays.
|
void |
setSideOffset(float sideOffset)
Sets the side offset of the rays.
|
Ray<T>[] |
updateRays() |
getOwner, getRays, setOwner, setRayspublic ParallelSideRayConfiguration(Steerable<T> owner, float length, float sideOffset)
ParallelSideRayConfiguration for the given owner where the two rays have the specified length and side
offset.owner - the owner of this ray configurationlength - the length of the rays.sideOffset - the side offset of the rays.public float getLength()
public void setLength(float length)
public float getSideOffset()
public void setSideOffset(float sideOffset)