C# Class SimpleSoccer.Net.Transformations

Show file Open project: soshimozi/SimpleSoccer.Net Class Usage Examples

Public Methods

Method Description
CreateWhiskers ( int NumWhiskers, double WhiskerLength, double fov, Vector2D facing, Vector2D origin ) : List

given an origin, a facing direction, a 'field of view' describing the limit of the outer whiskers, a whisker length and the number of whiskers this method returns a vector containing the end positions of a series of whiskers radiating away from the origin and with equal distance between them. (like the spokes of a wheel clipped to a specific segment size)

PointToLocalSpace ( Vector2D point, Vector2D AgentHeading, Vector2D AgentSide, Vector2D AgentPosition ) : Vector2D

PointToWorldSpace ( Vector2D point, Vector2D AgentHeading, Vector2D AgentSide, Vector2D AgentPosition ) : Vector2D

Transforms a point from the agent's local space into world space

Vec2DRotateAroundOrigin ( Vector2D v, double ang ) : void

rotates a vector ang rads around the origin

VectorToWorldSpace ( Vector2D vec, Vector2D AgentHeading, Vector2D AgentSide ) : Vector2D

Transforms a vector from the agent's local space into world space

WorldTransform ( List points, Vector2D pos, Vector2D forward, Vector2D side ) : List

given a List of 2D vectors, a position and orientation this function transforms the 2D vectors into the object's world space

WorldTransform ( List points, Vector2D pos, Vector2D forward, Vector2D side, Vector2D scale ) : List

given a List of 2D vectors, a position, orientation and scale, this function transforms the 2D vectors into the object's world space

Method Details

CreateWhiskers() public static method

given an origin, a facing direction, a 'field of view' describing the limit of the outer whiskers, a whisker length and the number of whiskers this method returns a vector containing the end positions of a series of whiskers radiating away from the origin and with equal distance between them. (like the spokes of a wheel clipped to a specific segment size)
public static CreateWhiskers ( int NumWhiskers, double WhiskerLength, double fov, Vector2D facing, Vector2D origin ) : List
NumWhiskers int
WhiskerLength double
fov double
facing Vector2D
origin Vector2D
return List

PointToLocalSpace() public static method

public static PointToLocalSpace ( Vector2D point, Vector2D AgentHeading, Vector2D AgentSide, Vector2D AgentPosition ) : Vector2D
point Vector2D
AgentHeading Vector2D
AgentSide Vector2D
AgentPosition Vector2D
return Vector2D

PointToWorldSpace() public static method

Transforms a point from the agent's local space into world space
public static PointToWorldSpace ( Vector2D point, Vector2D AgentHeading, Vector2D AgentSide, Vector2D AgentPosition ) : Vector2D
point Vector2D
AgentHeading Vector2D
AgentSide Vector2D
AgentPosition Vector2D
return Vector2D

Vec2DRotateAroundOrigin() public static method

rotates a vector ang rads around the origin
public static Vec2DRotateAroundOrigin ( Vector2D v, double ang ) : void
v Vector2D
ang double
return void

VectorToWorldSpace() public static method

Transforms a vector from the agent's local space into world space
public static VectorToWorldSpace ( Vector2D vec, Vector2D AgentHeading, Vector2D AgentSide ) : Vector2D
vec Vector2D
AgentHeading Vector2D
AgentSide Vector2D
return Vector2D

WorldTransform() public static method

given a List of 2D vectors, a position and orientation this function transforms the 2D vectors into the object's world space
public static WorldTransform ( List points, Vector2D pos, Vector2D forward, Vector2D side ) : List
points List
pos Vector2D
forward Vector2D
side Vector2D
return List

WorldTransform() public static method

given a List of 2D vectors, a position, orientation and scale, this function transforms the 2D vectors into the object's world space
public static WorldTransform ( List points, Vector2D pos, Vector2D forward, Vector2D side, Vector2D scale ) : List
points List
pos Vector2D
forward Vector2D
side Vector2D
scale Vector2D
return List