public class SoccerPitchDescription extends java.lang.Object implements ISoccerPitchDescription
Modifier and Type | Field and Description |
---|---|
float |
centerCircleRadius
The radius of the center circle
|
float |
fieldHalfLength
The half length of the soccer pitch (global x)
|
float |
fieldHalfWidth
The half width of the soccer pitch (global y)
|
float |
goalHalfWidth
The half width of the goals (global y)
|
float |
goalHeight
The height of the goals (global z)
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
otherGoalPosition
The position of the other goal (between the goal posts)
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
ownGoalPosition
The position of the own goal (between the goal posts)
|
float |
penaltyHalfLength
The half length of the penalty areas (global y)
|
float |
penaltyWidth
The width of the penalty areas (global x)
|
Constructor and Description |
---|
SoccerPitchDescription(float fieldHalfLength,
float fieldHalfWidth,
float goalHalfWidth,
float goalHeight,
float penaltyWidth,
float penaltyHalfLength,
float centerCircleRadius) |
SoccerPitchDescription(IRCServerMetaModel metaModel) |
Modifier and Type | Method and Description |
---|---|
float |
centerCircleRadius() |
float |
fieldHalfLength() |
float |
fieldHalfWith() |
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
getOtherGoalPosition()
Retrieve the position of the other goal (position between the goal posts).
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
getOwnGoalPosition()
Retrieve the position of the own goal (position between the goal posts).
|
float |
goalHalfWith() |
float |
goalHeight() |
boolean |
isInCenterCircleArea(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position,
float margin)
Checks if the given position is inside the center circle area and the
specified margin.
|
boolean |
isInOtherPenaltyArea(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position,
float margin)
Checks if the given position is inside the other penalty area and the
specified margin.
|
boolean |
isInOwnHalf(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position,
float margin)
Checks if the given position is inside the own half and the specified
margin.
|
boolean |
isInOwnPenaltyArea(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position,
float margin)
Checks if the given position is inside the own penalty area and the
specified margin.
|
boolean |
isInSoccerPitchArea(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position,
float margin)
Checks if the given position is inside the soccer pitch area and the
specified margin.
|
float |
penaltyHalfLength() |
float |
penaltyWith() |
public final float fieldHalfLength
public final float fieldHalfWidth
public final float goalHalfWidth
public final float goalHeight
public final float penaltyWidth
public final float penaltyHalfLength
public final float centerCircleRadius
public final org.apache.commons.math3.geometry.euclidean.threed.Vector3D ownGoalPosition
public final org.apache.commons.math3.geometry.euclidean.threed.Vector3D otherGoalPosition
public SoccerPitchDescription(float fieldHalfLength, float fieldHalfWidth, float goalHalfWidth, float goalHeight, float penaltyWidth, float penaltyHalfLength, float centerCircleRadius)
public SoccerPitchDescription(IRCServerMetaModel metaModel)
public float fieldHalfLength()
fieldHalfLength
in interface ISoccerPitchDescription
public float fieldHalfWith()
fieldHalfWith
in interface ISoccerPitchDescription
public float goalHalfWith()
goalHalfWith
in interface ISoccerPitchDescription
public float goalHeight()
goalHeight
in interface ISoccerPitchDescription
public float penaltyWith()
penaltyWith
in interface ISoccerPitchDescription
public float penaltyHalfLength()
penaltyHalfLength
in interface ISoccerPitchDescription
public float centerCircleRadius()
centerCircleRadius
in interface ISoccerPitchDescription
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getOwnGoalPosition()
ISoccerPitchDescription
getOwnGoalPosition
in interface ISoccerPitchDescription
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getOtherGoalPosition()
ISoccerPitchDescription
getOtherGoalPosition
in interface ISoccerPitchDescription
public boolean isInOwnPenaltyArea(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position, float margin)
ISoccerPitchDescription
isInOwnPenaltyArea
in interface ISoccerPitchDescription
position
- the position to testmargin
- the margin about which the own penalty area is enlarged
(positive values) or narrowed (negative values)public boolean isInOtherPenaltyArea(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position, float margin)
ISoccerPitchDescription
isInOtherPenaltyArea
in interface ISoccerPitchDescription
position
- the position to testmargin
- the margin about which the own penalty area is enlarged
(positive values) or narrowed (negative values)public boolean isInCenterCircleArea(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position, float margin)
ISoccerPitchDescription
isInCenterCircleArea
in interface ISoccerPitchDescription
position
- the position to testmargin
- the margin about which the own penalty area is enlarged
(positive values) or narrowed (negative values)public boolean isInSoccerPitchArea(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position, float margin)
ISoccerPitchDescription
isInSoccerPitchArea
in interface ISoccerPitchDescription
position
- the position to testmargin
- the margin about which the own penalty area is enlarged
(positive values) or narrowed (negative values)public boolean isInOwnHalf(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position, float margin)
ISoccerPitchDescription
isInOwnHalf
in interface ISoccerPitchDescription
position
- the position to testmargin
- the margin about which the area is enlarged (positive
values) or narrowed (negative values)