format

package
v0.0.0-...-c7e87eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2019 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveToGobFile

func SaveToGobFile(data *NavMeshData, file string) error

Types

type AABB

type AABB struct {
	M_Center Vector3f
	M_Extent Vector3f
}

type AutoOffMeshLinkData

type AutoOffMeshLinkData struct {
	M_Start         Vector3f
	M_End           Vector3f
	M_Radius        float32
	M_LinkType      uint16 // Off-mesh poly flags.
	M_Area          byte   // Off-mesh poly  area ids.
	M_LinkDirection byte   // Off-mesh connection direction flags (NavMeshLinkDirectionFlags)
}

func LoadNavMeshSceneDatFromJsonFile

func LoadNavMeshSceneDatFromJsonFile(file string) ([]float32, []AutoOffMeshLinkData, error)

type HeightMeshBVNode

type HeightMeshBVNode struct {
	Min, Max Vector3f
	I, N     int32
}

type HeightMeshData

type HeightMeshData struct {
	M_Vertices []Vector3f
	M_Indices  []int32
	M_Nodes    []HeightMeshBVNode
	M_Bounds   AABB
}
type NavMeshBuildSettings struct {
	AgentTypeID           int32
	AgentRadius           float32
	AgentHeight           float32
	AgentSlope            float32
	AgentClimb            float32
	LedgeDropHeight       float32
	MaxJumpAcrossDistance float32

	// Advanced
	MinRegionArea     float32
	ManualCellSize    int32
	CellSize          float32
	ManualTileSize    int32
	TileSize          int32
	AccuratePlacement int32
}
type NavMeshData struct {
	M_NavMeshBuildSettings NavMeshBuildSettings
	M_NavMeshTiles         []NavMeshTileData
	M_HeightMeshes         []HeightMeshData
	M_OffMeshLinks         []AutoOffMeshLinkData
	M_FilterAreaCosts      []float32

	M_SourceBounds AABB
	M_Rotation     Quaternionf
	M_Position     Vector3f
	M_AgentTypeID  int32
}

func LoadFromByteStream

func LoadFromByteStream(byteStream []byte) (*NavMeshData, error)

func LoadFromGobFile

func LoadFromGobFile(file string) (*NavMeshData, error)

func LoadFromTxtFile

func LoadFromTxtFile(file string) (*NavMeshData, error)
func (this *NavMeshData) SetSceneData(areaCosts []float32, offMeshLinks []AutoOffMeshLinkData)
type NavMeshTileData struct {
	M_MeshData []byte
	M_Hash     [16]byte
}

type Quaternionf

type Quaternionf struct {
	X, Y, Z, W float32
}

type Vector3f

type Vector3f struct {
	X, Y, Z float32
}

func (*Vector3f) Set

func (this *Vector3f) Set(i int, v float32)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL