Documentation
¶
Index ¶
- func TriangleArea(t Traingle2D) float64
- type BaseGraph2D
- type BasicBorderedSpline2D
- type BasicPoint2D
- type BasicSpline2D
- type BorderedSpline2D
- type Class
- type Competitor
- type CornerLevel
- type DriveTrain
- type Driver
- type DrivingStyle
- type Event
- type EventResults
- type Graph2D
- type GraphLink
- type GraphNode
- type Line2D
- type Point2D
- type Point3D
- type Ranking
- type Segment
- type Segments
- type Spline2D
- type Square2D
- type Terrain
- type TerrainSkills
- type Track
- type TrackResult
- type TrackState
- type Traingle2D
- type Vehicle
- type VehicleSkills
- type VehicleState
- type VehicleStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TriangleArea ¶
func TriangleArea(t Traingle2D) float64
Types ¶
type BaseGraph2D ¶
type BaseGraph2D struct {
Nodes []GraphNode
}
func (BaseGraph2D) GetNodes ¶
func (bg BaseGraph2D) GetNodes() []GraphNode
type BasicBorderedSpline2D ¶
type BasicBorderedSpline2D struct {
// contains filtered or unexported fields
}
func (BasicBorderedSpline2D) GetNodes ¶
func (bbs BasicBorderedSpline2D) GetNodes() []Point2D
func (BasicBorderedSpline2D) Looped ¶
func (bbs BasicBorderedSpline2D) Looped() bool
func (BasicBorderedSpline2D) Size ¶
func (bbs BasicBorderedSpline2D) Size() int
func (BasicBorderedSpline2D) Width ¶
func (bbs BasicBorderedSpline2D) Width(node int) float64
type BasicPoint2D ¶
type BasicPoint2D struct {
// contains filtered or unexported fields
}
Generic Point Implementation
func (BasicPoint2D) SetX ¶
func (bp BasicPoint2D) SetX(x float64)
func (BasicPoint2D) SetY ¶
func (bp BasicPoint2D) SetY(y float64)
func (BasicPoint2D) X ¶
func (bp BasicPoint2D) X() float64
func (BasicPoint2D) Y ¶
func (bp BasicPoint2D) Y() float64
type BasicSpline2D ¶
type BasicSpline2D struct {
// contains filtered or unexported fields
}
func (BasicSpline2D) GetNode ¶
func (bs BasicSpline2D) GetNode(index int) Point2D
func (BasicSpline2D) Looped ¶
func (bs BasicSpline2D) Looped() bool
func (BasicSpline2D) Size ¶
func (bs BasicSpline2D) Size() int
type BorderedSpline2D ¶
type Competitor ¶
type CornerLevel ¶
type CornerLevel uint8
Corner Levels will be calculated on the fly for by the angle between nodes
type Driver ¶
type Driver struct { Name string `json:"name"` Age uint64 `json:"age"` TerrainSkills TerrainSkills `json:"terrainSkills"` DrivingStyle DrivingStyle `json:"drivingStyle"` VehicleSkills VehicleSkills `json:"vehicleSkills"` }
type DrivingStyle ¶
type DrivingStyle [5]uint32
Represents the driver style for each caracteristic
[0]Recklessness - Limits the max speed estimate accurace [1]Communication - Extend the max number os pacenotes called [2]Aggressiveness - Limits the max torque estimate accurace [3]Adaptability - Limits the track estimate resolution [4]Reflexes - Limits the grip estimate resolution
type EventResults ¶
type EventResults map[Competitor][]TrackResult
type Ranking ¶
type Ranking map[Competitor]float64
type Segment ¶
type TerrainSkills ¶
type TerrainSkills [6]uint32
Represents the driver skill for each terrain
[0]Tarmac [1]Mud [2]HeavyGravel [3]LightGravel [4]Sand [5]Snow
type TrackResult ¶
type TrackResult struct { TotalTime float64 TimeBySegment []float64 VStateBySecond []VehicleState TStateBySecond []TrackState }
type TrackState ¶
type Traingle2D ¶
type Traingle2D [3]Point2D
type Vehicle ¶
type Vehicle struct { Name string `json:"name"` Manufacturer string `json:"manufacturer"` Class Class `json:"cls"` DriveTrain DriveTrain `json:"driveTrain"` VehicleStats VehicleStats `json:"vehicleStats"` }
type VehicleSkills ¶
type VehicleSkills [3]uint32
Represents the driver skill for each drivetrain
[0]FWD [1]RWD [2]AWD
type VehicleState ¶
type VehicleStats ¶
type VehicleStats [5]uint32
Represents vehicle stats [0]Weight [1]Power [2]Torque [3]BreakTorque [4]Gears
Click to show internal directories.
Click to hide internal directories.