gameplaykit

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package gameplaykit provides purego-based Go bindings for the macOS GameplayKit framework.

Apple documentation: https://developer.apple.com/documentation/gameplaykit

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Acl_entry_id_t

type Acl_entry_id_t int64
const (
	ACL_FIRST_ENTRY Acl_entry_id_t = 0
	ACL_NEXT_ENTRY  Acl_entry_id_t = -1
	ACL_LAST_ENTRY  Acl_entry_id_t = -2
)

func (Acl_entry_id_t) String

func (e Acl_entry_id_t) String() string

type Acl_flag_t

type Acl_flag_t int64
const (
	ACL_FLAG_DEFER_INHERIT      Acl_flag_t = 1
	ACL_FLAG_NO_INHERIT         Acl_flag_t = 131072
	ACL_ENTRY_INHERITED         Acl_flag_t = 16
	ACL_ENTRY_FILE_INHERIT      Acl_flag_t = 32
	ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64
	ACL_ENTRY_LIMIT_INHERIT     Acl_flag_t = 128
	ACL_ENTRY_ONLY_INHERIT      Acl_flag_t = 256
)

func (Acl_flag_t) String

func (e Acl_flag_t) String() string

type Acl_perm_t

type Acl_perm_t int64
const (
	ACL_READ_DATA           Acl_perm_t = 2
	ACL_LIST_DIRECTORY      Acl_perm_t = 2
	ACL_WRITE_DATA          Acl_perm_t = 4
	ACL_ADD_FILE            Acl_perm_t = 4
	ACL_EXECUTE             Acl_perm_t = 8
	ACL_SEARCH              Acl_perm_t = 8
	ACL_DELETE              Acl_perm_t = 16
	ACL_APPEND_DATA         Acl_perm_t = 32
	ACL_ADD_SUBDIRECTORY    Acl_perm_t = 32
	ACL_DELETE_CHILD        Acl_perm_t = 64
	ACL_READ_ATTRIBUTES     Acl_perm_t = 128
	ACL_WRITE_ATTRIBUTES    Acl_perm_t = 256
	ACL_READ_EXTATTRIBUTES  Acl_perm_t = 512
	ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024
	ACL_READ_SECURITY       Acl_perm_t = 2048
	ACL_WRITE_SECURITY      Acl_perm_t = 4096
	ACL_CHANGE_OWNER        Acl_perm_t = 8192
	ACL_SYNCHRONIZE         Acl_perm_t = 1048576
)

func (Acl_perm_t) String

func (e Acl_perm_t) String() string

type Acl_tag_t

type Acl_tag_t int64
const (
	ACL_UNDEFINED_TAG  Acl_tag_t = 0
	ACL_EXTENDED_ALLOW Acl_tag_t = 1
	ACL_EXTENDED_DENY  Acl_tag_t = 2
)

func (Acl_tag_t) String

func (e Acl_tag_t) String() string

type Acl_type_t

type Acl_type_t int64
const (
	ACL_TYPE_EXTENDED Acl_type_t = 256
	ACL_TYPE_ACCESS   Acl_type_t = 0
	ACL_TYPE_DEFAULT  Acl_type_t = 1
	ACL_TYPE_AFS      Acl_type_t = 2
	ACL_TYPE_CODA     Acl_type_t = 3
	ACL_TYPE_NTFS     Acl_type_t = 4
	ACL_TYPE_NWFS     Acl_type_t = 5
)

func (Acl_type_t) String

func (e Acl_type_t) String() string

type CGLCPContextPriorityRequest

type CGLCPContextPriorityRequest int64
const (
	KCGLCPContextPriorityRequestHigh   CGLCPContextPriorityRequest = 0
	KCGLCPContextPriorityRequestNormal CGLCPContextPriorityRequest = 1
	KCGLCPContextPriorityRequestLow    CGLCPContextPriorityRequest = 2
)

func (CGLCPContextPriorityRequest) String

type Clockid_t

type Clockid_t int64

func (Clockid_t) String

func (e Clockid_t) String() string

type Dispatch_autorelease_frequency_t

type Dispatch_autorelease_frequency_t uint64
const (
	DISPATCH_AUTORELEASE_FREQUENCY_INHERIT   Dispatch_autorelease_frequency_t = 0
	DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1
	DISPATCH_AUTORELEASE_FREQUENCY_NEVER     Dispatch_autorelease_frequency_t = 2
)

func (Dispatch_autorelease_frequency_t) String

type Dispatch_block_flags_t

type Dispatch_block_flags_t uint64
const (
	DISPATCH_BLOCK_BARRIER           Dispatch_block_flags_t = 1
	DISPATCH_BLOCK_DETACHED          Dispatch_block_flags_t = 2
	DISPATCH_BLOCK_ASSIGN_CURRENT    Dispatch_block_flags_t = 4
	DISPATCH_BLOCK_NO_QOS_CLASS      Dispatch_block_flags_t = 8
	DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16
	DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32
)

func (Dispatch_block_flags_t) String

func (e Dispatch_block_flags_t) String() string

type EvCmd

type EvCmd int64
const (
	EVNOP   EvCmd = 0
	EVHIDE  EvCmd = 1
	EVSHOW  EvCmd = 2
	EVMOVE  EvCmd = 3
	EVLEVEL EvCmd = 4
)

func (EvCmd) String

func (e EvCmd) String() string

type Filesec_property_t

type Filesec_property_t int64
const (
	FILESEC_OWNER         Filesec_property_t = 1
	FILESEC_GROUP         Filesec_property_t = 2
	FILESEC_UUID          Filesec_property_t = 3
	FILESEC_MODE          Filesec_property_t = 4
	FILESEC_ACL           Filesec_property_t = 5
	FILESEC_GRPUUID       Filesec_property_t = 6
	FILESEC_ACL_RAW       Filesec_property_t = 100
	FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101
)

func (Filesec_property_t) String

func (e Filesec_property_t) String() string

type GKARC4RandomSource

type GKARC4RandomSource struct {
	GKRandomSource
}

A deterministic pseudo-random source that generates random numbers based on an arc4 algorithm. This is a deterministic random source suitable for creating reliable gameplay mechanics. While deterministic, this is not a cryptographic random source, however it may be useful for obfuscation of gameplay data in manner similar to a stream cipher.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkarc4randomsource

func GKARC4RandomSourceFromID

func GKARC4RandomSourceFromID(id objc.ID) *GKARC4RandomSource

func (*GKARC4RandomSource) DropValuesWithCount

func (o *GKARC4RandomSource) DropValuesWithCount(count uint)

Arc4 based random sources have repeatable initial sequences. If used for obfuscation you should drop N values from the start, where N should be any number larger than 768 to ensure the initial sequence is flushed.

func (*GKARC4RandomSource) Init

Initializes an arc4 random source with bits from high entropy system resource like SecRandomCopyBytes.

func (*GKARC4RandomSource) InitWithSeed

func (o *GKARC4RandomSource) InitWithSeed(seed *foundation.NSData) *GKARC4RandomSource

Initializes an arc4 random source with bits from the seed.

func (*GKARC4RandomSource) Seed

The seed used to stir the arc4 random source. The seed is not encoded through archiving, but the equivalent state buffers are encoded.

func (*GKARC4RandomSource) SetSeed

func (o *GKARC4RandomSource) SetSeed(seed *foundation.NSData)

type GKAgent

type GKAgent struct {
	GKComponent
}

An agent is a point mass whose local coordinate system is aligned to its velocity. Agents have a variety of steering functions that can be used to simulate vehicles or entities with agency. The units of mass, velocity and radius are dimensionless but related. The visual representation of these values are specific to each game's own situation. @discussion Values close to 1.0 should be canonical and are expected to yield pleasing results. When applied to visuals these values should be scaled and biased into their target coordinate system and a simple filter on top ensures any noise generated from the steering logic doesn't affect the visual represtentation.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkagent

func GKAgentFromID

func GKAgentFromID(id objc.ID) *GKAgent

func (*GKAgent) Behavior

func (o *GKAgent) Behavior() *GKBehavior

The behavior to apply when updateWithDeltaTime is called. All forces from the goals in the behavior are summed and then applied.

func (*GKAgent) Delegate

func (o *GKAgent) Delegate() GKAgentDelegate

Object which has agentDidUpdate called on it during this agent's behavior updatekbeha

func (*GKAgent) Mass

func (o *GKAgent) Mass() float32

Agent's mass. Used for agent impulse application purposes. Defaults to 1.0

func (*GKAgent) MaxAcceleration

func (o *GKAgent) MaxAcceleration() float32

Maximum amount of acceleration that can be applied to this agent. All applied impulses are clipped to this amount. Defaults to 1.0

func (*GKAgent) MaxSpeed

func (o *GKAgent) MaxSpeed() float32

Maximum speed of this agent. Impulses cannot cause the agents speed to ever be greater than this value. Defaults to 1.0

func (*GKAgent) Radius

func (o *GKAgent) Radius() float32

Radius of the agent's bounding circle. Used by the agent avoid steering functions. Defaults to 0.5 for a canonical diameter of 1.0

func (*GKAgent) SetBehavior

func (o *GKAgent) SetBehavior(behavior *GKBehavior)

func (*GKAgent) SetDelegate

func (o *GKAgent) SetDelegate(delegate GKAgentDelegate)

func (*GKAgent) SetMass

func (o *GKAgent) SetMass(mass float32)

func (*GKAgent) SetMaxAcceleration

func (o *GKAgent) SetMaxAcceleration(maxAcceleration float32)

func (*GKAgent) SetMaxSpeed

func (o *GKAgent) SetMaxSpeed(maxSpeed float32)

func (*GKAgent) SetRadius

func (o *GKAgent) SetRadius(radius float32)

func (*GKAgent) SetSpeed

func (o *GKAgent) SetSpeed(speed float32)

func (*GKAgent) Speed

func (o *GKAgent) Speed() float32

Current speed of the agent along its foward direction. Defaults to 0.0

type GKAgent2D

type GKAgent2D struct {
	GKAgent
}

A 2D specalization of an agent that moves on a 2-axis logical coordinate system. This coordinate system does not need to match the visual coordinate system of the delegate. One simple case of that is isometric 2D content where the game model is on a flat 2D plane but the visuals are displayed on an angle where one of the logical axes are used for simulated depth as well as some translation in the display plane.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkagent2d

func GKAgent2DFromID

func GKAgent2DFromID(id objc.ID) *GKAgent2D

func (*GKAgent2D) Position

func (o *GKAgent2D) Position() unsafe.Pointer

Position of the agent on the logical XY plane

func (*GKAgent2D) Rotation

func (o *GKAgent2D) Rotation() float32

Z rotation of the agent on the logical XY plane

func (*GKAgent2D) SetPosition

func (o *GKAgent2D) SetPosition(position unsafe.Pointer)

func (*GKAgent2D) SetRotation

func (o *GKAgent2D) SetRotation(rotation float32)

func (*GKAgent2D) Velocity

func (o *GKAgent2D) Velocity() unsafe.Pointer

Current logical velocity of the agent. The forward vector can be derived by normalizing this.

type GKAgent3D

type GKAgent3D struct {
	GKAgent
}

A 3D specialization of an agent that moves on a 3-axis logical coordinate system.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkagent3d

func GKAgent3DFromID

func GKAgent3DFromID(id objc.ID) *GKAgent3D

func (*GKAgent3D) Position

func (o *GKAgent3D) Position() unsafe.Pointer

Position of the agent on the logical XYZ plane

func (*GKAgent3D) RightHanded

func (o *GKAgent3D) RightHanded() bool

Should this vehicle operate in a right-handed coordinate system? NO means it will be left-handed

func (*GKAgent3D) Rotation

func (o *GKAgent3D) Rotation() unsafe.Pointer

The 3x3 rotation matrix that defines the orientation of this agent in 3D space columns[0] is forward, columns[1] is up, columns[2] is side

func (*GKAgent3D) SetPosition

func (o *GKAgent3D) SetPosition(position unsafe.Pointer)

func (*GKAgent3D) SetRightHanded

func (o *GKAgent3D) SetRightHanded(rightHanded bool)

func (*GKAgent3D) SetRotation

func (o *GKAgent3D) SetRotation(rotation unsafe.Pointer)

func (*GKAgent3D) Velocity

func (o *GKAgent3D) Velocity() unsafe.Pointer

Current logical velocity of the agent. The forward vector can be derived by normalizing this.

type GKAgentDelegate

type GKAgentDelegate interface {
}

GKAgentDelegate wraps the ObjC protocol GKAgentDelegate.

type GKBehavior

type GKBehavior struct {
	foundation.NSObject
}

A collection of GKGoals or GKBehaviors with weights that can be applied to a GKAgent The sub-goals or sub-behaviors are summed to produce a total force to be applied to an agent

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkbehavior

func GKBehaviorBehaviorWithGoalWeight

func GKBehaviorBehaviorWithGoalWeight(goal *GKGoal, weight float32) *GKBehavior

Creates a behavior with a single goal and weight

func GKBehaviorBehaviorWithGoals

func GKBehaviorBehaviorWithGoals(goals *foundation.NSArray[*GKGoal]) *GKBehavior

Creates a behavior with an array of goals. All weights are set to 1.0f

func GKBehaviorBehaviorWithGoalsAndWeights

func GKBehaviorBehaviorWithGoalsAndWeights(goals *foundation.NSArray[*GKGoal], weights *foundation.NSArray[*foundation.NSNumber]) *GKBehavior

Creates a behavior with two associated arrays of goals and weights

func GKBehaviorBehaviorWithWeightedGoals

func GKBehaviorBehaviorWithWeightedGoals(weightedGoals *foundation.NSDictionary[*GKGoal, *foundation.NSNumber]) *GKBehavior

Creates a behavior with a dictionary of goal/weight pairs

func GKBehaviorFromID

func GKBehaviorFromID(id objc.ID) *GKBehavior

func (*GKBehavior) GoalCount

func (o *GKBehavior) GoalCount() int

func (*GKBehavior) ObjectAtIndexedSubscript

func (o *GKBehavior) ObjectAtIndexedSubscript(idx uint) *GKGoal

Supports getting goals via a [int] subscript.

func (*GKBehavior) ObjectForKeyedSubscript

func (o *GKBehavior) ObjectForKeyedSubscript(goal *GKGoal) *foundation.NSNumber

Supports getting a weight via a [goal] subscript.

func (*GKBehavior) RemoveAllGoals

func (o *GKBehavior) RemoveAllGoals()

Removes all the goals on the behavior.

func (*GKBehavior) RemoveGoal

func (o *GKBehavior) RemoveGoal(goal *GKGoal)

Remove the indicated goal from this behavior. @param goal the goal to be removed

func (*GKBehavior) SetObjectForKeyedSubscript

func (o *GKBehavior) SetObjectForKeyedSubscript(weight *foundation.NSNumber, goal *GKGoal)

Supports setting a weight via a [goal] subscript.

func (*GKBehavior) SetWeightForGoal

func (o *GKBehavior) SetWeightForGoal(weight float32, goal *GKGoal)

Adds a new goal or changes the weight of the existing goal in this behavior. If the goal does not exist in this behavior, it is added. @param weight the weight for this goal @param goal the goal who's weight to change

func (*GKBehavior) WeightForGoal

func (o *GKBehavior) WeightForGoal(goal *GKGoal) float32

Gets the current weight for a given goal. @return the weight of the goal, or 0 if there is no such goal on this behavior

type GKBillowNoiseSource

type GKBillowNoiseSource struct {
	GKCoherentNoiseSource
}

Billow noise is similar to Perlin noise, with more rounded shapes and clearly-defined transitions beween values.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkbillownoisesource

func GKBillowNoiseSourceBillowNoiseSourceWithFrequencyOctaveCountPersistenceLacunaritySeed

func GKBillowNoiseSourceBillowNoiseSourceWithFrequencyOctaveCountPersistenceLacunaritySeed(frequency float64, octaveCount int, persistence float64, lacunarity float64, seed int32) *GKBillowNoiseSource

func GKBillowNoiseSourceFromID

func GKBillowNoiseSourceFromID(id objc.ID) *GKBillowNoiseSource

func (*GKBillowNoiseSource) InitWithFrequencyOctaveCountPersistenceLacunaritySeed

func (o *GKBillowNoiseSource) InitWithFrequencyOctaveCountPersistenceLacunaritySeed(frequency float64, octaveCount int, persistence float64, lacunarity float64, seed int32) *GKBillowNoiseSource

func (*GKBillowNoiseSource) Persistence

func (o *GKBillowNoiseSource) Persistence() float64

func (*GKBillowNoiseSource) SetPersistence

func (o *GKBillowNoiseSource) SetPersistence(persistence float64)

type GKBox

type GKBox struct {
	BoxMin unsafe.Pointer
	BoxMax unsafe.Pointer
}

Representation of an axis aligned box via its min corner (lower-left) and max corner (upper-right)

type GKCheckerboardNoiseSource

type GKCheckerboardNoiseSource struct {
	GKNoiseSource
}

Produces noise in a checkerboard pattern.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkcheckerboardnoisesource

func GKCheckerboardNoiseSourceCheckerboardNoiseWithSquareSize

func GKCheckerboardNoiseSourceCheckerboardNoiseWithSquareSize(squareSize float64) *GKCheckerboardNoiseSource

func GKCheckerboardNoiseSourceFromID

func GKCheckerboardNoiseSourceFromID(id objc.ID) *GKCheckerboardNoiseSource

func (*GKCheckerboardNoiseSource) InitWithSquareSize

func (o *GKCheckerboardNoiseSource) InitWithSquareSize(squareSize float64) *GKCheckerboardNoiseSource

func (*GKCheckerboardNoiseSource) SetSquareSize

func (o *GKCheckerboardNoiseSource) SetSquareSize(squareSize float64)

func (*GKCheckerboardNoiseSource) SquareSize

func (o *GKCheckerboardNoiseSource) SquareSize() float64

type GKCircleObstacle

type GKCircleObstacle struct {
	GKObstacle
}

An obstacle with an impassible radius

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkcircleobstacle

func GKCircleObstacleFromID

func GKCircleObstacleFromID(id objc.ID) *GKCircleObstacle

func GKCircleObstacleObstacleWithRadius

func GKCircleObstacleObstacleWithRadius(radius float32) *GKCircleObstacle

func (*GKCircleObstacle) InitWithRadius

func (o *GKCircleObstacle) InitWithRadius(radius float32) *GKCircleObstacle

func (*GKCircleObstacle) Position

func (o *GKCircleObstacle) Position() unsafe.Pointer

Position of the center of the circle in 2D space.

func (*GKCircleObstacle) Radius

func (o *GKCircleObstacle) Radius() float32

Radius of the impassible circle

func (*GKCircleObstacle) SetPosition

func (o *GKCircleObstacle) SetPosition(position unsafe.Pointer)

func (*GKCircleObstacle) SetRadius

func (o *GKCircleObstacle) SetRadius(radius float32)

type GKCoherentNoiseSource

type GKCoherentNoiseSource struct {
	GKNoiseSource
}

Coherent noise is smoothly-changing, semi-random noise. A given input always produces the same output. A small change in input produces a small change in output. A large change in input produces a random change in output. This class is not intended to be instantiated.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkcoherentnoisesource

func GKCoherentNoiseSourceFromID

func GKCoherentNoiseSourceFromID(id objc.ID) *GKCoherentNoiseSource

func (*GKCoherentNoiseSource) Frequency

func (o *GKCoherentNoiseSource) Frequency() float64

func (*GKCoherentNoiseSource) Lacunarity

func (o *GKCoherentNoiseSource) Lacunarity() float64

func (*GKCoherentNoiseSource) OctaveCount

func (o *GKCoherentNoiseSource) OctaveCount() int

func (*GKCoherentNoiseSource) Seed

func (o *GKCoherentNoiseSource) Seed() int32

func (*GKCoherentNoiseSource) SetFrequency

func (o *GKCoherentNoiseSource) SetFrequency(frequency float64)

func (*GKCoherentNoiseSource) SetLacunarity

func (o *GKCoherentNoiseSource) SetLacunarity(lacunarity float64)

func (*GKCoherentNoiseSource) SetOctaveCount

func (o *GKCoherentNoiseSource) SetOctaveCount(octaveCount int)

func (*GKCoherentNoiseSource) SetSeed

func (o *GKCoherentNoiseSource) SetSeed(seed int32)

type GKComponent

type GKComponent struct {
	foundation.NSObject
}

A component is the data and logic for one part of an object in an entity-component system. Entities have many components but components are associated with only a single entity. Components across entities are best arranged in ComponentSystems, which are homogeneous collections of components that the game logic updates in a deterministic order. @see GKComponentSystem

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkcomponent

func GKComponentFromID

func GKComponentFromID(id objc.ID) *GKComponent

func (*GKComponent) DidAddToEntity

func (o *GKComponent) DidAddToEntity()

Override this to perform game logic when this component is added to an entity

func (*GKComponent) Entity

func (o *GKComponent) Entity() *GKEntity

The entity that this component belongs to. Defaults to nil until the component is added to an entity.

func (*GKComponent) UpdateWithDeltaTime

func (o *GKComponent) UpdateWithDeltaTime(seconds float64)

Updates the component with the given delta time since the last update. Each component should perform its time-based logic in this method.

func (*GKComponent) WillRemoveFromEntity

func (o *GKComponent) WillRemoveFromEntity()

Override this to perform game logic before this entity is removed from it's entity

type GKComponentSystem

type GKComponentSystem[ComponentType purego.AnyObject] struct {
	foundation.NSObject
}

A component system is a homogeneous collection of components that are intended to be called at the same time. The system is homogeneous, meaning it only allows members of the same class into the system.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkcomponentsystem

func GKComponentSystemFromID

func GKComponentSystemFromID[ComponentType purego.AnyObject](id objc.ID) *GKComponentSystem[ComponentType]

func (*GKComponentSystem[ComponentType]) AddComponent

func (o *GKComponentSystem[ComponentType]) AddComponent(component ComponentType)

Adds a component to the system. The component must be of the same class as the system's componentClass. The component is added to the tail of the collection and will be processed after components that were added before it. @throws NSInvalidArgumentException if the component added is not a kind of the system's componentClass.

func (*GKComponentSystem[ComponentType]) AddComponentWithEntity

func (o *GKComponentSystem[ComponentType]) AddComponentWithEntity(entity *GKEntity)

Adds the supported component from the entity's component collection. This is conceptually the same as the pseudo-code: for (GKComponent *component in entity.components) if (component.class == system.componentClass) [system addComponent:component] @see GKEntity.components

func (*GKComponentSystem[ComponentType]) ClassForGenericArgumentAtIndex

func (o *GKComponentSystem[ComponentType]) ClassForGenericArgumentAtIndex(index uint) objc.Class

Returns the class of the specified generic index

func (*GKComponentSystem[ComponentType]) ComponentClass

func (o *GKComponentSystem[ComponentType]) ComponentClass() objc.Class

The collection's component class. Any selector the component supports can be called on the system and it will be forwarded to each of the components in the collection.

func (*GKComponentSystem[ComponentType]) Components

func (o *GKComponentSystem[ComponentType]) Components() *foundation.NSArray[ComponentType]

The array of components currently in the system.

func (*GKComponentSystem[ComponentType]) InitWithComponentClass

func (o *GKComponentSystem[ComponentType]) InitWithComponentClass(cls objc.Class) *GKComponentSystem[ComponentType]

Initializes a system for the given component class. The receiver can now only accept components of the given class.

func (*GKComponentSystem[ComponentType]) ObjectAtIndexedSubscript

func (o *GKComponentSystem[ComponentType]) ObjectAtIndexedSubscript(idx uint) ComponentType

Supports getting components via a [] subscript.

func (*GKComponentSystem[ComponentType]) RemoveComponent

func (o *GKComponentSystem[ComponentType]) RemoveComponent(component ComponentType)

Removes a component from the system Does nothing if the component is not in this system

func (*GKComponentSystem[ComponentType]) RemoveComponentWithEntity

func (o *GKComponentSystem[ComponentType]) RemoveComponentWithEntity(entity *GKEntity)

Removes the supported component from the entity's component collection This is conceptually the same as the pseudo-code: for (GKComponent *component in entity.components) if (component.class == system.componentClass) [system removeComponent:component]

func (*GKComponentSystem[ComponentType]) UpdateWithDeltaTime

func (o *GKComponentSystem[ComponentType]) UpdateWithDeltaTime(seconds float64)

Updates each component with the given delta time since the last update. Each component thus performs its time based logic with a single message.

type GKCompositeBehavior

type GKCompositeBehavior struct {
	GKBehavior
}

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkcompositebehavior

func GKCompositeBehaviorBehaviorWithBehaviors

func GKCompositeBehaviorBehaviorWithBehaviors(behaviors *foundation.NSArray[*GKBehavior]) *GKCompositeBehavior

Creates a behavior with an array of sub-behaviors

func GKCompositeBehaviorBehaviorWithBehaviorsAndWeights

func GKCompositeBehaviorBehaviorWithBehaviorsAndWeights(behaviors *foundation.NSArray[*GKBehavior], weights *foundation.NSArray[*foundation.NSNumber]) *GKCompositeBehavior

Creates a behavior with two associated arrays of sub-behaviors and weights

func GKCompositeBehaviorFromID

func GKCompositeBehaviorFromID(id objc.ID) *GKCompositeBehavior

func (*GKCompositeBehavior) BehaviorCount

func (o *GKCompositeBehavior) BehaviorCount() int

Number of sub-behaviors in this behavior

func (*GKCompositeBehavior) RemoveAllBehaviors

func (o *GKCompositeBehavior) RemoveAllBehaviors()

Removes all the sub-behavior on the behavior.

func (*GKCompositeBehavior) RemoveBehavior

func (o *GKCompositeBehavior) RemoveBehavior(behavior *GKBehavior)

Remove the indicated sub-behavior from this behavior. @param behavior the sub-behavior to be removed

func (*GKCompositeBehavior) SetWeightForBehavior

func (o *GKCompositeBehavior) SetWeightForBehavior(weight float32, behavior *GKBehavior)

Adds a new sub-behavior or changes the weight of the existing sub-behavior in this behavior. If the sub-behavior does not exist in this behavior, it is added. @param weight the weight for this goal @param behavior the sub-behavior who's weight to change

func (*GKCompositeBehavior) WeightForBehavior

func (o *GKCompositeBehavior) WeightForBehavior(behavior *GKBehavior) float32

Gets the current weight for a given sub-behavior. @return the weight of the sub-behavior, or 0 if there is no such sub-behavior on this behavior

type GKConstantNoiseSource

type GKConstantNoiseSource struct {
	GKNoiseSource
}

Produces a single, constant value at all positions in the space.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkconstantnoisesource

func GKConstantNoiseSourceConstantNoiseWithValue

func GKConstantNoiseSourceConstantNoiseWithValue(value float64) *GKConstantNoiseSource

func GKConstantNoiseSourceFromID

func GKConstantNoiseSourceFromID(id objc.ID) *GKConstantNoiseSource

func (*GKConstantNoiseSource) InitWithValue

func (o *GKConstantNoiseSource) InitWithValue(value float64) *GKConstantNoiseSource

func (*GKConstantNoiseSource) SetValue

func (o *GKConstantNoiseSource) SetValue(value float64)

func (*GKConstantNoiseSource) Value

func (o *GKConstantNoiseSource) Value() float64

type GKCylindersNoiseSource

type GKCylindersNoiseSource struct {
	GKNoiseSource
}

Produces 3D cylindrical noise with an infinite number of cylinders-within-cyliners of constantly-increasing radius.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkcylindersnoisesource

func GKCylindersNoiseSourceCylindersNoiseWithFrequency

func GKCylindersNoiseSourceCylindersNoiseWithFrequency(frequency float64) *GKCylindersNoiseSource

func GKCylindersNoiseSourceFromID

func GKCylindersNoiseSourceFromID(id objc.ID) *GKCylindersNoiseSource

func (*GKCylindersNoiseSource) Frequency

func (o *GKCylindersNoiseSource) Frequency() float64

func (*GKCylindersNoiseSource) InitWithFrequency

func (o *GKCylindersNoiseSource) InitWithFrequency(frequency float64) *GKCylindersNoiseSource

func (*GKCylindersNoiseSource) SetFrequency

func (o *GKCylindersNoiseSource) SetFrequency(frequency float64)

type GKDecisionNode

type GKDecisionNode struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkdecisionnode

func GKDecisionNodeFromID

func GKDecisionNodeFromID(id objc.ID) *GKDecisionNode

func (*GKDecisionNode) CreateBranchWithPredicateAttribute

func (o *GKDecisionNode) CreateBranchWithPredicateAttribute(predicate *foundation.NSPredicate, attribute foundation.NSObjectProtocol) *GKDecisionNode

Creates a predicated branch to a node containing the specified attribute @param predicate The predicate to create a branch with @param attribute The attribute of the created node @return The node lead to by the branch

func (*GKDecisionNode) CreateBranchWithValueAttribute

func (o *GKDecisionNode) CreateBranchWithValueAttribute(value *foundation.NSNumber, attribute foundation.NSObjectProtocol) *GKDecisionNode

Creates a numeric branch to a node containing the specified attribute @param value The value to create a branch with @param attribute The attribute of the created node @return The node lead to by the branch

func (*GKDecisionNode) CreateBranchWithWeightAttribute

func (o *GKDecisionNode) CreateBranchWithWeightAttribute(weight int, attribute foundation.NSObjectProtocol) *GKDecisionNode

Creates a random branch to a node containing the specified attribute @param weight The weight to create a branch with (weighted for random selection) @param attribute The attribute of the created node @return The node lead to by the branch @see GKDecisionTree

type GKDecisionTree

type GKDecisionTree struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkdecisiontree

func GKDecisionTreeFromID

func GKDecisionTreeFromID(id objc.ID) *GKDecisionTree

func (*GKDecisionTree) ExportToURLError

func (o *GKDecisionTree) ExportToURLError(url *foundation.NSURL, error_ unsafe.Pointer) bool

Exports a decision tree to the given URL @param url The URL to which the contents will be exported @return The response indicating the status of the decision tree being successfully exported

func (*GKDecisionTree) FindActionForAnswers

Will branch down from the root node to find the correct action attribute for the given collection of results and their respective attributes @param answers The dictionary of attributes (keys) and their answers (values) @return The attribute found by traversing the tree given the provided answers

func (*GKDecisionTree) InitWithAttribute

func (o *GKDecisionTree) InitWithAttribute(attribute foundation.NSObjectProtocol) *GKDecisionTree

Initializes the decision tree with a root node containing the provided attribute @param attribute The attribute to be contained at the root of the tree @return GKDecisionTree with the set root

func (*GKDecisionTree) InitWithExamplesActionsAttributes

func (o *GKDecisionTree) InitWithExamplesActionsAttributes(examples *foundation.NSArray[objc.ID], actions *foundation.NSArray[foundation.NSObjectProtocol], attributes *foundation.NSArray[foundation.NSObjectProtocol]) *GKDecisionTree

Initializes and constructs a decision tree by learning from the provided examples & attributes @param examples Must be an array of examples (with each example being a collection of the various attributes at a given state) @param actions An array of the corresponding actions for each example. Ordered such that the first action matches with the first example in examples. @param attributes The list of attributes. Ordered such that the first attribute matches with the first result in each example. So if we have two attributes: [distance, jump height], and two examples: [[20, 8], [15, 14]], and the resulting actions here: [Roll, Jump], we can think of this as a matrix: distance| height <- Attributes _______|_______ | | | | 20 | 8 | jump |-------|-------|------- <- Results | 15 | 14 | roll |_______|_______| ^ | Examples @return GKDecisionTree created by learning from the provided examples for the provided attributes

func (*GKDecisionTree) InitWithURLError

func (o *GKDecisionTree) InitWithURLError(url *foundation.NSURL, error_ unsafe.Pointer) *GKDecisionTree

Initializes a decision tree from the contents of a file @param url The URL from which the contents will be loaded @return The instance of the decision tree constructed

func (*GKDecisionTree) RandomSource

func (o *GKDecisionTree) RandomSource() *GKRandomSource

The random source used by the decision tree when descending on a random branch This must be set before creating any weighted branches @see GKDecisionNode

func (*GKDecisionTree) RootNode

func (o *GKDecisionTree) RootNode() *GKDecisionNode

The node for the decision tree that all other nodes descend from

func (*GKDecisionTree) SetRandomSource

func (o *GKDecisionTree) SetRandomSource(randomSource *GKRandomSource)

type GKEntity

type GKEntity struct {
	foundation.NSObject
}

An entity is the general purpose object in an entity-component system. Entites have many components but components are associated with only a single entity. Note: GKEntity supports NSCopying and NSSecureCoding, but your custom GKComponent's must also support NSCopying and NSSecureCoding @see GKComponent @see GKComponentSystem

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkentity

func GKEntityEntity

func GKEntityEntity() *GKEntity

Creates a new entity ready to have components added to it.

func GKEntityFromID

func GKEntityFromID(id objc.ID) *GKEntity

func (*GKEntity) AddComponent

func (o *GKEntity) AddComponent(component *GKComponent)

Adds a component to this entity. If a component of the same class already exists it is overwritten with the new component. @param component the component to be added @see GKComponent

func (*GKEntity) ComponentForClass

func (o *GKEntity) ComponentForClass(componentClass objc.Class) *GKComponent

Gets the component of the indicated class. Returns nil if entity does not have this component @param componentClass the class of the component you want to get

func (*GKEntity) Components

func (o *GKEntity) Components() *foundation.NSArray[*GKComponent]

Access the current set of components as an array. Note: this is not the internal array of components, but rather a newly created array of the current component mapping.

func (*GKEntity) Init

func (o *GKEntity) Init() *GKEntity

Creates a new entity ready to have components added to it.

func (*GKEntity) RemoveComponentForClass

func (o *GKEntity) RemoveComponentForClass(componentClass objc.Class)

Removes the component of the indicates class from this entity @param componentClass the class of the component you want to remove

func (*GKEntity) UpdateWithDeltaTime

func (o *GKEntity) UpdateWithDeltaTime(seconds float64)

General update loop for this entity, which also updates all components in this entity that are not currently in a dedicated component system. Per-entity component updates is a simpler and less flexible option to using per-component updates, however both can not be allowed to occur at the same time for a component. Thus components that are added to dedicated component systems will not be updated here as they have opted for the more powerful feature of per-component systems. Update those components via their system instead. @see GKComponentSystem @param seconds elapsed time, in seconds, since last frame

type GKGameModel

type GKGameModel interface {
	foundation.NSCopying
	SetGameModel(gameModel GKGameModel)
	GameModelUpdatesForPlayer(player GKGameModelPlayer) *foundation.NSArray[GKGameModelUpdate]
	ApplyGameModelUpdate(gameModelUpdate GKGameModelUpdate)
	Players() *foundation.NSArray[GKGameModelPlayer]
	ActivePlayer() GKGameModelPlayer
}

GKGameModel wraps the ObjC protocol GKGameModel.

type GKGameModelPlayer

type GKGameModelPlayer interface {
	PlayerId() int
}

GKGameModelPlayer wraps the ObjC protocol GKGameModelPlayer.

type GKGameModelUpdate

type GKGameModelUpdate interface {
	Value() int
	SetValue(value int)
}

GKGameModelUpdate wraps the ObjC protocol GKGameModelUpdate.

type GKGaussianDistribution

type GKGaussianDistribution struct {
	GKRandomDistribution
}

A gaussian distribution is biased towards the mean value, the possible outcomes are spread out from the mean with decreasing probability. Values within 1 deviation of the mean make up 68.27% of the distribution, values within 2 deviations make up 95% and values within 3 deviations make up 99.7%. Note that a gaussian distribution's unbounded behavior beyond 3 deviations is undesired, thus this distribution deviates nominally by modifying the bounds to 3 deviations. Thus values within 3 deviations actually make up 100% of the distribution.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkgaussiandistribution

func GKGaussianDistributionFromID

func GKGaussianDistributionFromID(id objc.ID) *GKGaussianDistribution

func (*GKGaussianDistribution) Deviation

func (o *GKGaussianDistribution) Deviation() float32

The deviation, often called 'sigma', is the deviation from the mean that would include roughly 68% of the distribution. The range of the distribution is [mean - 3 * deviation, mean + 3 * deviation]. Values beyond 3 deviations are considered so improbable that they are removed from the output set.

func (*GKGaussianDistribution) InitWithRandomSourceLowestValueHighestValue

func (o *GKGaussianDistribution) InitWithRandomSourceLowestValueHighestValue(source GKRandom, lowestInclusive int, highestInclusive int) *GKGaussianDistribution

Initializes a Gaussian random distribution within the range [lowest, highest] using a source to grab input values from. This sets the gaussian parameters to: mean = (highest + lowest) / 2 deviation = (highest - lowest) / 6 The mean and deviation will be floating point numbers even if the distribution is meant to produce integer values. @see mean @see deviation

func (*GKGaussianDistribution) InitWithRandomSourceMeanDeviation

func (o *GKGaussianDistribution) InitWithRandomSourceMeanDeviation(source GKRandom, mean float32, deviation float32) *GKGaussianDistribution

Initializes a Gaussian random distribution within the range [mean - 3 * deviation, mean + 3 * deviation] using a source to grab input values from.

func (*GKGaussianDistribution) Mean

func (o *GKGaussianDistribution) Mean() float32

The mean, or expected, value of the distribution. Values are more probable the closer to the mean they are.

type GKGoal

type GKGoal struct {
	foundation.NSObject
}

Defines a spatial directive. The various goals cause force to be applied to agents to try to achieve said goal.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkgoal

func GKGoalFromID

func GKGoalFromID(id objc.ID) *GKGoal

func GKGoalGoalToAlignWithAgentsMaxDistanceMaxAngle

func GKGoalGoalToAlignWithAgentsMaxDistanceMaxAngle(agents *foundation.NSArray[*GKAgent], maxDistance float32, maxAngle float32) *GKGoal

Creates a goal to align this agent's orientation with the average orientation of the group of agents. @param maxDistance the distance between agents before alignment happens @param maxAngle the angle, in radians, between this agent's foward and the vector toward the other agent before alignment happens

func GKGoalGoalToAvoidAgentsMaxPredictionTime

func GKGoalGoalToAvoidAgentsMaxPredictionTime(agents *foundation.NSArray[*GKAgent], maxPredictionTime float64) *GKGoal

Creates a goal to avoid colliding with a group of agents taking into account those agent's momentum @param maxPredictionTime how far ahead in the future, in seconds, should we look for potential collisions

func GKGoalGoalToAvoidObstaclesMaxPredictionTime

func GKGoalGoalToAvoidObstaclesMaxPredictionTime(obstacles *foundation.NSArray[*GKObstacle], maxPredictionTime float64) *GKGoal

Creates a goal to avoid colliding with a group of agents without taking into account those agents' momentum @param maxPredictionTime how far ahead in the future, in seconds, should we look for potential collisions

func GKGoalGoalToCohereWithAgentsMaxDistanceMaxAngle

func GKGoalGoalToCohereWithAgentsMaxDistanceMaxAngle(agents *foundation.NSArray[*GKAgent], maxDistance float32, maxAngle float32) *GKGoal

Creates a goal to seek the average position of the group of agents. @param maxDistance the distance between agents before cohesion happens @param maxAngle the angle between this agent's foward and the vector toward the other agent before cohesion happens

func GKGoalGoalToFleeAgent

func GKGoalGoalToFleeAgent(agent *GKAgent) *GKGoal

Creates a goal to move away from the agent @param agent the agent to flee from

func GKGoalGoalToFollowPathMaxPredictionTimeForward

func GKGoalGoalToFollowPathMaxPredictionTimeForward(path *GKPath, maxPredictionTime float64, forward bool) *GKGoal

Creates a goal that will attempt to follow the given path @param path the path to follow @param maxPredictionTime how far ahead in the future, in seconds, should we look for potential intercepts @param forward direction to follow the path. forward = NO is reverse

func GKGoalGoalToInterceptAgentMaxPredictionTime

func GKGoalGoalToInterceptAgentMaxPredictionTime(target *GKAgent, maxPredictionTime float64) *GKGoal

Creates a goal that will attempt to intercept another target agent taking into account that agent's momentum @param target agent to intercept @param maxPredictionTime how far ahead in the future, in seconds, should we look for potential intercepts

func GKGoalGoalToReachTargetSpeed

func GKGoalGoalToReachTargetSpeed(targetSpeed float32) *GKGoal

Creates a goal that attempts to change our momentum to reach the target speed @param targetSpeed the target speed

func GKGoalGoalToSeekAgent

func GKGoalGoalToSeekAgent(agent *GKAgent) *GKGoal

Creates a goal to move toward the agent @param agent the agent to seek

func GKGoalGoalToSeparateFromAgentsMaxDistanceMaxAngle

func GKGoalGoalToSeparateFromAgentsMaxDistanceMaxAngle(agents *foundation.NSArray[*GKAgent], maxDistance float32, maxAngle float32) *GKGoal

Creates a goal that tries to repel this agent away from the other agents and attempts to prevent overlap @param maxDistance the distance between agents before repelling happens @param maxAngle the angle, in radians, between this agent's foward and the vector toward the other agent before the repelling happens

func GKGoalGoalToStayOnPathMaxPredictionTime

func GKGoalGoalToStayOnPathMaxPredictionTime(path *GKPath, maxPredictionTime float64) *GKGoal

Creates a goal that will attempt to stay on the given path @param path the path to follow @param maxPredictionTime how far ahead in the future, in seconds, should we look for potential intercepts

func GKGoalGoalToWander

func GKGoalGoalToWander(speed float32) *GKGoal

Creates a goal that will make the agent appear to wander, aimlessly moving forward and turning randomly @param speed the speed at which to wander

type GKGraph

type GKGraph struct {
	foundation.NSObject
}

Representation of a directed graph of GKGraphNodes

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkgraph

func GKGraphFromID

func GKGraphFromID(id objc.ID) *GKGraph

func GKGraphGraphWithNodes

func GKGraphGraphWithNodes(nodes *foundation.NSArray[*GKGraphNode]) *GKGraph

Creates a graph with the provided array of nodes. @params nodes the nodes to create the graph with

func (*GKGraph) AddNodes

func (o *GKGraph) AddNodes(nodes *foundation.NSArray[*GKGraphNode])

Adds nodes to this graph. No new connections are added. If the node already exists in this graph this does nothing. @param nodes and array of nodes to be added

func (*GKGraph) ConnectNodeToLowestCostNodeBidirectional

func (o *GKGraph) ConnectNodeToLowestCostNodeBidirectional(node *GKGraphNode, bidirectional bool)

Connects the node to this graph via the lowest cost node to reach in this graph @param node the node to connect @param bidirectional should the connection be bidirectional? Otherwise it is one way connected into the graph

func (*GKGraph) FindPathFromNodeToNode

func (o *GKGraph) FindPathFromNodeToNode(startNode *GKGraphNode, endNode *GKGraphNode) *foundation.NSArray[*GKGraphNode]

Attempts to find the optimal path between the two nodes indicated. If such a path exists, it is returned in start to end order. If it doesn't exist, the array returned will be empty. Asserts if neither of these nodes are in this graph. Use [GKGraphNode findPathFromNode:] instead. @param startNode node to start pathing from @param endNode goal node of the pathfinding attempt

func (*GKGraph) InitWithNodes

func (o *GKGraph) InitWithNodes(nodes *foundation.NSArray[*GKGraphNode]) *GKGraph

func (*GKGraph) Nodes

func (o *GKGraph) Nodes() *foundation.NSArray[*GKGraphNode]

The list of nodes in this graph

func (*GKGraph) RemoveNodes

func (o *GKGraph) RemoveNodes(nodes *foundation.NSArray[*GKGraphNode])

Removes nodes from this graph. All connections starting and/or ending with this node are removed. @param nodes an array of nodes to be removed

type GKGraphNode

type GKGraphNode struct {
	foundation.NSObject
}

A node in a directed graph. Edges are directed and can have variable costs.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkgraphnode

func GKGraphNodeFromID

func GKGraphNodeFromID(id objc.ID) *GKGraphNode

func (*GKGraphNode) AddConnectionsToNodesBidirectional

func (o *GKGraphNode) AddConnectionsToNodesBidirectional(nodes *foundation.NSArray[*GKGraphNode], bidirectional bool)

Add a connection to a group of other nodes indicating those nodes can be reached from this node. A new connection is not created if it already exists. @param nodes The array of nodes that are end points for their respective connections @param bidirectional should a connection also be added connecting the destination node back to this node?

func (*GKGraphNode) ConnectedNodes

func (o *GKGraphNode) ConnectedNodes() *foundation.NSArray[*GKGraphNode]

List of other graph nodes that this node has an edge leading to.

func (*GKGraphNode) CostToNode

func (o *GKGraphNode) CostToNode(node *GKGraphNode) float32

Returns the actual cost to reach the indicated node from this node

func (*GKGraphNode) EstimatedCostToNode

func (o *GKGraphNode) EstimatedCostToNode(node *GKGraphNode) float32

Returns the estimated heuristic cost to reach the indicated node from this node @param node The end point of the edge who's cost is to be estimated

func (*GKGraphNode) FindPathFromNode

func (o *GKGraphNode) FindPathFromNode(startNode *GKGraphNode) *foundation.NSArray[*GKGraphNode]

As with findPathToNode: except this node is the goal node and a startNode is specified @param startNode the start node of the pathfinding attempt

func (*GKGraphNode) FindPathToNode

func (o *GKGraphNode) FindPathToNode(goalNode *GKGraphNode) *foundation.NSArray[*GKGraphNode]

Attempts to find the optimal path between this node and the indicated goal node. If such a path exists, it is returned in start to end order. If it doesn't exist, the array returned will be empty. @param goalNode the goal node of the pathfinding attempt

func (*GKGraphNode) RemoveConnectionsToNodesBidirectional

func (o *GKGraphNode) RemoveConnectionsToNodesBidirectional(nodes *foundation.NSArray[*GKGraphNode], bidirectional bool)

Removes connections to a group of other nodes indicating those nodes can no longer be reached from this node. Nothing happens if a particular connection does not exist. @param nodes The array of nodes that are end points of the edges to be removed @param bidirectional should the connection also be added the destination node back to this node also be removed if it exists?

type GKGraphNode2D

type GKGraphNode2D struct {
	GKGraphNode
}

GKGraphNode coupled with a 2D position

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkgraphnode2d

func GKGraphNode2DFromID

func GKGraphNode2DFromID(id objc.ID) *GKGraphNode2D

func GKGraphNode2DNodeWithPoint

func GKGraphNode2DNodeWithPoint(point unsafe.Pointer) *GKGraphNode2D

func (*GKGraphNode2D) InitWithPoint

func (o *GKGraphNode2D) InitWithPoint(point unsafe.Pointer) *GKGraphNode2D

func (*GKGraphNode2D) Position

func (o *GKGraphNode2D) Position() unsafe.Pointer

func (*GKGraphNode2D) SetPosition

func (o *GKGraphNode2D) SetPosition(position unsafe.Pointer)

type GKGraphNode3D

type GKGraphNode3D struct {
	GKGraphNode
}

GKGraphNode coupled with a 3D position

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkgraphnode3d

func GKGraphNode3DFromID

func GKGraphNode3DFromID(id objc.ID) *GKGraphNode3D

func GKGraphNode3DNodeWithPoint

func GKGraphNode3DNodeWithPoint(point unsafe.Pointer) *GKGraphNode3D

func (*GKGraphNode3D) InitWithPoint

func (o *GKGraphNode3D) InitWithPoint(point unsafe.Pointer) *GKGraphNode3D

func (*GKGraphNode3D) Position

func (o *GKGraphNode3D) Position() unsafe.Pointer

func (*GKGraphNode3D) SetPosition

func (o *GKGraphNode3D) SetPosition(position unsafe.Pointer)

type GKGridGraph

type GKGridGraph[NodeType purego.AnyObject] struct {
	GKGraph
}

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkgridgraph

func GKGridGraphFromID

func GKGridGraphFromID[NodeType purego.AnyObject](id objc.ID) *GKGridGraph[NodeType]

func GKGridGraphGraphFromGridStartingAtWidthHeightDiagonalsAllowed

func GKGridGraphGraphFromGridStartingAtWidthHeightDiagonalsAllowed(position unsafe.Pointer, width int, height int, diagonalsAllowed bool) *GKGridGraph[objc.ID]

Creates a bidirectional graph connecting all of the points on a 2D grid @param position starting position in the grid @param width how wide the grid will be; the grid will continue along the positive X axis from the starting x value @param height how high the grid will be; the grid will continue along the positive Y axis from the starting y value @param diagonalsAllowed should diagonal connections between nodes be made? If not, only cardinal directions will be connected.

func GKGridGraphGraphFromGridStartingAtWidthHeightDiagonalsAllowedNodeClass

func GKGridGraphGraphFromGridStartingAtWidthHeightDiagonalsAllowedNodeClass(position unsafe.Pointer, width int, height int, diagonalsAllowed bool, nodeClass objc.Class) *GKGridGraph[objc.ID]

Creates a bidirectional graph connecting all of the points on a 2D grid @param position starting position in the grid @param width how wide the grid will be; the grid will continue along the positive X axis from the starting x value @param height how high the grid will be; the grid will continue along the positive Y axis from the starting y value @param diagonalsAllowed should diagonal connections between nodes be made? If not, only cardinal directions will be connected. @param nodeClass the class of the nodes that this graph should create. Must descend from GKGridGraphNode

func (*GKGridGraph[NodeType]) ClassForGenericArgumentAtIndex

func (o *GKGridGraph[NodeType]) ClassForGenericArgumentAtIndex(index uint) objc.Class

Returns the class of the specified generic index

func (*GKGridGraph[NodeType]) ConnectNodeToAdjacentNodes

func (o *GKGridGraph[NodeType]) ConnectNodeToAdjacentNodes(node *GKGridGraphNode)

Connects the given GKGridGraphNode to this graph by connecting it to it's adjacent nodes on the grid Input node must have coordinates within the rectangle specified by minCoordinates and maxCoordinates @param node the node to be connected

func (*GKGridGraph[NodeType]) DiagonalsAllowed

func (o *GKGridGraph[NodeType]) DiagonalsAllowed() bool

func (*GKGridGraph[NodeType]) GridHeight

func (o *GKGridGraph[NodeType]) GridHeight() uint

func (*GKGridGraph[NodeType]) GridOrigin

func (o *GKGridGraph[NodeType]) GridOrigin() unsafe.Pointer

func (*GKGridGraph[NodeType]) GridWidth

func (o *GKGridGraph[NodeType]) GridWidth() uint

func (*GKGridGraph[NodeType]) InitFromGridStartingAtWidthHeightDiagonalsAllowed

func (o *GKGridGraph[NodeType]) InitFromGridStartingAtWidthHeightDiagonalsAllowed(position unsafe.Pointer, width int, height int, diagonalsAllowed bool) *GKGridGraph[NodeType]

func (*GKGridGraph[NodeType]) InitFromGridStartingAtWidthHeightDiagonalsAllowedNodeClass

func (o *GKGridGraph[NodeType]) InitFromGridStartingAtWidthHeightDiagonalsAllowedNodeClass(position unsafe.Pointer, width int, height int, diagonalsAllowed bool, nodeClass objc.Class) *GKGridGraph[NodeType]

func (*GKGridGraph[NodeType]) NodeAtGridPosition

func (o *GKGridGraph[NodeType]) NodeAtGridPosition(position unsafe.Pointer) NodeType

Returns the GKGridGraphNode at the indicated X and Y coordinate Returns nil if it is outside the bounds of minCoordinates and maxCoordinates @param position starting position in the grid

type GKGridGraphNode

type GKGridGraphNode struct {
	GKGraphNode
}

GKGraphNode coupled with a position on a 2D grid

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkgridgraphnode

func GKGridGraphNodeFromID

func GKGridGraphNodeFromID(id objc.ID) *GKGridGraphNode

func GKGridGraphNodeNodeWithGridPosition

func GKGridGraphNodeNodeWithGridPosition(gridPosition unsafe.Pointer) *GKGridGraphNode

func (*GKGridGraphNode) GridPosition

func (o *GKGridGraphNode) GridPosition() unsafe.Pointer

func (*GKGridGraphNode) InitWithGridPosition

func (o *GKGridGraphNode) InitWithGridPosition(gridPosition unsafe.Pointer) *GKGridGraphNode

type GKLinearCongruentialRandomSource

type GKLinearCongruentialRandomSource struct {
	GKRandomSource
}

A deterministic pseudo-random source that generates random numbers based on a linear congruential algorithm. This is a deterministic random source suitable for creating reliable gameplay mechanics. It is slightly faster than an Arc4 source, but less random. In particular the lower bits of the generated values are less random than the higher bits. While deterministic, this is not a cryptographic random source. It is also not suitable for obfuscation of gameplay data.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gklinearcongruentialrandomsource

func GKLinearCongruentialRandomSourceFromID

func GKLinearCongruentialRandomSourceFromID(id objc.ID) *GKLinearCongruentialRandomSource

func (*GKLinearCongruentialRandomSource) Init

Initializes a linear congruential random source with bits from high entropy system resource like SecRandomCopyBytes.

func (*GKLinearCongruentialRandomSource) InitWithSeed

Initializes a linear congruential random source with bits the given 64 bit seed.

func (*GKLinearCongruentialRandomSource) Seed

The seed used to stir the linear congruential random source. The seed changes each time a random value is generated from this source, as the seed is the state buffer. The seed is encoded through archiving.

func (*GKLinearCongruentialRandomSource) SetSeed

func (o *GKLinearCongruentialRandomSource) SetSeed(seed uint64)

type GKMersenneTwisterRandomSource

type GKMersenneTwisterRandomSource struct {
	GKRandomSource
}

A deterministic pseudo-random source that generates random numbers based on a mersenne twister algorithm. This is a deterministic random source suitable for creating reliable gameplay mechanics. It is slightly slower than an Arc4 source, but more random, in that it has a longer period until repeating sequences. While deterministic, this is not a cryptographic random source. It is however suitable for obfuscation of gameplay data.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkmersennetwisterrandomsource

func GKMersenneTwisterRandomSourceFromID

func GKMersenneTwisterRandomSourceFromID(id objc.ID) *GKMersenneTwisterRandomSource

func (*GKMersenneTwisterRandomSource) Init

Initializes a linear congruential random source with bits from a high entropy system resource like SecRandomCopyBytes.

func (*GKMersenneTwisterRandomSource) InitWithSeed

Initializes a linear congruential random source with bits the given 64 bit seed.

func (*GKMersenneTwisterRandomSource) Seed

The seed used to stir the mersenne twister random source. The seed is not encoded through archiving, but the equivalent state buffers are encoded.

func (*GKMersenneTwisterRandomSource) SetSeed

func (o *GKMersenneTwisterRandomSource) SetSeed(seed uint64)

type GKMeshGraph

type GKMeshGraph[NodeType purego.AnyObject] struct {
	GKGraph
}

A collection of GKGraphNodes that are governed by a mesh formed by the space between a set of GKPolygonObstacles

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkmeshgraph

func GKMeshGraphFromID

func GKMeshGraphFromID[NodeType purego.AnyObject](id objc.ID) *GKMeshGraph[NodeType]

func GKMeshGraphGraphWithBufferRadiusMinCoordinateMaxCoordinate

func GKMeshGraphGraphWithBufferRadiusMinCoordinateMaxCoordinate(bufferRadius float32, min unsafe.Pointer, max unsafe.Pointer) *GKMeshGraph[objc.ID]

Same as [GKMeshGraph graphWithBufferRadius:minCoordinate:maxCoordinate:nodeClass:] where custom node class defaults to GKGraphNode2D

func GKMeshGraphGraphWithBufferRadiusMinCoordinateMaxCoordinateNodeClass

func GKMeshGraphGraphWithBufferRadiusMinCoordinateMaxCoordinateNodeClass(bufferRadius float32, min unsafe.Pointer, max unsafe.Pointer, nodeClass objc.Class) *GKMeshGraph[objc.ID]

Creates a graph with a given buffer radius Obstacles can then be added to this graph prior to a call to [GKMeshGraph trianglulate] @param bufferRadius the circular radius of a potential agent that will navigate this graph. Obstacles are extruded by this amount to create the graph. Must be positive. Negative values are clipped to 0.0f @param min the minimum coordinate (lower left corner) of the bounding box that will encapsulate this graph. No obstacles should fall outside this bounding box. @param max the maximum coordinate (upper right corner) of the bounding box that will encapsulate this graph. No obstacles should fall outside this bounding box. @param nodeClass the class of the nodes that this graph should create. Must descend from GKGraphNode2D

func (*GKMeshGraph[NodeType]) AddObstacles

func (o *GKMeshGraph[NodeType]) AddObstacles(obstacles *foundation.NSArray[*GKPolygonObstacle])

Adds obstacles to this mesh graph. Only reflected after the next triangulate call.

func (*GKMeshGraph[NodeType]) BufferRadius

func (o *GKMeshGraph[NodeType]) BufferRadius() float32

The distance by which all obstacles are extruded. This is most commonly the spatial bounding radius of a potential traveler on this path

func (*GKMeshGraph[NodeType]) ClassForGenericArgumentAtIndex

func (o *GKMeshGraph[NodeType]) ClassForGenericArgumentAtIndex(index uint) objc.Class

Returns the class of the specified generic index

func (*GKMeshGraph[NodeType]) ConnectNodeUsingObstacles

func (o *GKMeshGraph[NodeType]) ConnectNodeUsingObstacles(node NodeType)

Connects the node to this graph by inserting it into an existing triangle and making the appropriate connections Node must be in the space defined by the min and max coordinates of this graph. @param node the node to connect

func (*GKMeshGraph[NodeType]) InitWithBufferRadiusMinCoordinateMaxCoordinate

func (o *GKMeshGraph[NodeType]) InitWithBufferRadiusMinCoordinateMaxCoordinate(bufferRadius float32, min unsafe.Pointer, max unsafe.Pointer) *GKMeshGraph[NodeType]

func (*GKMeshGraph[NodeType]) InitWithBufferRadiusMinCoordinateMaxCoordinateNodeClass

func (o *GKMeshGraph[NodeType]) InitWithBufferRadiusMinCoordinateMaxCoordinateNodeClass(bufferRadius float32, min unsafe.Pointer, max unsafe.Pointer, nodeClass objc.Class) *GKMeshGraph[NodeType]

func (*GKMeshGraph[NodeType]) Obstacles

func (o *GKMeshGraph[NodeType]) Obstacles() *foundation.NSArray[*GKPolygonObstacle]

Array of the extruded obstacles currently represented by this graph

func (*GKMeshGraph[NodeType]) RemoveObstacles

func (o *GKMeshGraph[NodeType]) RemoveObstacles(obstacles *foundation.NSArray[*GKPolygonObstacle])

Removes obstacles from this graph. Only reflected after the next triangulate call.

func (*GKMeshGraph[NodeType]) SetTriangulationMode

func (o *GKMeshGraph[NodeType]) SetTriangulationMode(triangulationMode GKMeshGraphTriangulationMode)

func (*GKMeshGraph[NodeType]) TriangleAtIndex

func (o *GKMeshGraph[NodeType]) TriangleAtIndex(index uint) GKTriangle

Returns the triangle at the given index @see numTriangles @param index the index of the triangle to be returned @return the triangle at the given index

func (*GKMeshGraph[NodeType]) TriangleCount

func (o *GKMeshGraph[NodeType]) TriangleCount() uint

The number of triangles currently in this mesh graph

func (*GKMeshGraph[NodeType]) Triangulate

func (o *GKMeshGraph[NodeType]) Triangulate()

Generates a new triangle mesh for the given obstacles. This should be called after some number of calls to addObstacle The negative space between all input obstacles are triangulated to create a mesh This mesh is turned into a set of connected graph nodes based on

func (*GKMeshGraph[NodeType]) TriangulationMode

func (o *GKMeshGraph[NodeType]) TriangulationMode() GKMeshGraphTriangulationMode

Specifies how graph nodes are generated when you triangulate this graph. You can combine triangulation modes using the | (OR) operator @see GKMeshGraphTriangulationMode

type GKMeshGraphTriangulationMode

type GKMeshGraphTriangulationMode uint64
const (
	GKMeshGraphTriangulationModeVertices      GKMeshGraphTriangulationMode = 1
	GKMeshGraphTriangulationModeCenters       GKMeshGraphTriangulationMode = 2
	GKMeshGraphTriangulationModeEdgeMidpoints GKMeshGraphTriangulationMode = 4
)

func (GKMeshGraphTriangulationMode) String

type GKMinmaxStrategist

type GKMinmaxStrategist struct {
	foundation.NSObject
}

The Minmax Strategist is a generic AI that selects a game model update for a given player that maximises potential gain, while minimising potential loss. It does this by examining all of the updates available to the player in question, extrapolating the potential moves opposing players may take, projecting out maxLookAheadDepth number of turns. The selected update will result in the greatest potential gain, balanced against the potential gain of other players.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkminmaxstrategist

func GKMinmaxStrategistFromID

func GKMinmaxStrategistFromID(id objc.ID) *GKMinmaxStrategist

func (*GKMinmaxStrategist) BestMoveForPlayer

func (o *GKMinmaxStrategist) BestMoveForPlayer(player GKGameModelPlayer) GKGameModelUpdate

Selects the best move for the specified player. If randomSource is not nil, it will randomly select which move to use if there are one or more ties for the best. Returns nil if the player is invalid, the player is not a part of the game model, or the player has no valid moves available.

func (*GKMinmaxStrategist) MaxLookAheadDepth

func (o *GKMinmaxStrategist) MaxLookAheadDepth() int

The maximum number of future turns that will be processed when searching for a move.

func (*GKMinmaxStrategist) RandomMoveForPlayerFromNumberOfBestMoves

func (o *GKMinmaxStrategist) RandomMoveForPlayerFromNumberOfBestMoves(player GKGameModelPlayer, numMovesToConsider int) GKGameModelUpdate

Selects one move from the set of N best moves for the specified player, where N is equal to numMovesToConsider. If randomSource is nil, it will not randomly select, but will behave like bestMoveForPlayer and return the first best move. Returns nil if the player is invalid, the player is not a part of the game model, or the player has no valid moves available.

func (*GKMinmaxStrategist) SetMaxLookAheadDepth

func (o *GKMinmaxStrategist) SetMaxLookAheadDepth(maxLookAheadDepth int)

type GKMonteCarloStrategist

type GKMonteCarloStrategist struct {
	foundation.NSObject
}

The Monte Carlo Strategist is a generic AI that selects a game model update for a given player that results in the highest likelihood for that player to eventually win the game. It does this by sampling the updates available to the player in question. In doing this it will select the update it knows to produce the best result so far, expanding on this selection, simulating the rest of the game from that expansion, and then propogating the results (win or loss) upwards. It will do this until the budget has been reached, then returning the choice it has deemed best suited for the player in question.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkmontecarlostrategist

func GKMonteCarloStrategistFromID

func GKMonteCarloStrategistFromID(id objc.ID) *GKMonteCarloStrategist

func (*GKMonteCarloStrategist) Budget

func (o *GKMonteCarloStrategist) Budget() uint

The maximum number of samples that will be processed when searching for a move.

func (*GKMonteCarloStrategist) ExplorationParameter

func (o *GKMonteCarloStrategist) ExplorationParameter() uint

A weight that encourages exploration of less visited updates versus the continued exploitation of previously visited updates.

func (*GKMonteCarloStrategist) SetBudget

func (o *GKMonteCarloStrategist) SetBudget(budget uint)

func (*GKMonteCarloStrategist) SetExplorationParameter

func (o *GKMonteCarloStrategist) SetExplorationParameter(explorationParameter uint)

type GKNSPredicateRule

type GKNSPredicateRule struct {
	GKRule
}

A convenient subclass of GKRule that leverages existing NSPRedicate functionality for evaluating the predicate of the rule.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gknspredicaterule

func GKNSPredicateRuleFromID

func GKNSPredicateRuleFromID(id objc.ID) *GKNSPredicateRule

func (*GKNSPredicateRule) InitWithPredicate

func (o *GKNSPredicateRule) InitWithPredicate(predicate *foundation.NSPredicate) *GKNSPredicateRule

Initializes a new rule with the given NSPredicate

func (*GKNSPredicateRule) Predicate

func (o *GKNSPredicateRule) Predicate() *foundation.NSPredicate

The NSPredicate that is used inside this subclass's implementation of evaluatePredicateWithSystem: In order to effectively use this class you must still override performActionWithSystem: @see GKRule.evaluatePredicateWithSystem:

type GKNoise

type GKNoise struct {
	foundation.NSObject
}

GKNoise is the object used to manipulate and combine noise in continuous 3D space. It takes a GKNoiseSource as input. To extract and use a portion of the noise within the 3D space use the GKNoiseMap class. @see GKNoiseSource @see GKNoiseMap

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gknoise

func GKNoiseFromID

func GKNoiseFromID(id objc.ID) *GKNoise

func GKNoiseNoiseWithComponentNoisesSelectionNoise

func GKNoiseNoiseWithComponentNoisesSelectionNoise(noises *foundation.NSArray[*GKNoise], selectionNoise *GKNoise) *GKNoise

Initializes a composite noise from one or more component noises. Useful for combining and layering noises together. @param noises The component noises to combine. @param selectionNoise The noise that governs which component noise is chosen for each position of the resulting noise. The range of values is equally-subdivided for each component noise.

func GKNoiseNoiseWithComponentNoisesSelectionNoiseComponentBoundariesBoundaryBlendDistances

func GKNoiseNoiseWithComponentNoisesSelectionNoiseComponentBoundariesBoundaryBlendDistances(noises *foundation.NSArray[*GKNoise], selectionNoise *GKNoise, componentBoundaries *foundation.NSArray[*foundation.NSNumber], blendDistances *foundation.NSArray[*foundation.NSNumber]) *GKNoise

Initializes a composite noise from one or more component noises. Useful for combining and layering noises together. @param noises The component noises to combine. @param selectionNoise The noise that governs which component noise is chosen for each position of the resulting noise. The range of values is equally-subdivided for each component noise. @param componentBoundaries The noise value boundaries of the selection noise to use for the component noises. Specify one less boundary than the number of component noises. This is a parallel array to blendDistances. @param blendDistances The size of smoothing that is applied to boundaries where two component noises meet. Specify one less blend distance than the number of component noises. This is a parallel array to componentBoundaries.

func GKNoiseNoiseWithNoiseSource

func GKNoiseNoiseWithNoiseSource(noiseSource *GKNoiseSource) *GKNoise

Initializes a noise with the specified noise source. @param noiseSource The noise source to use to initially populate the 3D noise space.

func GKNoiseNoiseWithNoiseSourceGradientColors

func GKNoiseNoiseWithNoiseSourceGradientColors(noiseSource *GKNoiseSource, gradientColors *foundation.NSDictionary[*foundation.NSNumber, *appkit.NSColor]) *GKNoise

Initializes a noise with the specified noise source and parameters. @param noiseSource The noise source to use to initially populate the 3D noise space. @param gradientColors The color gradient to use for this noise in 'value : color' pairs.

func (*GKNoise) AddWithNoise

func (o *GKNoise) AddWithNoise(noise *GKNoise)

Adds all noise values by the noise values at the same position in specified noise. @param noise The noise from which to add values to this noise.

func (*GKNoise) ApplyAbsoluteValue

func (o *GKNoise) ApplyAbsoluteValue()

Takes the absoltue value of all noise positions.

func (*GKNoise) ApplyTurbulenceWithFrequencyPowerRoughnessSeed

func (o *GKNoise) ApplyTurbulenceWithFrequencyPowerRoughnessSeed(frequency float64, power float64, roughness int, seed int32)

Applies a turbulent displacement to all noise values.

func (*GKNoise) ClampWithLowerBoundUpperBound

func (o *GKNoise) ClampWithLowerBoundUpperBound(lowerBound float64, upperBound float64)

Clamps all noise values to the specified bounds. @param lowerBound The noise value lower bound. @param upperBound The noise value upper bound.

func (*GKNoise) DisplaceXWithNoiseYWithNoiseZWithNoise

func (o *GKNoise) DisplaceXWithNoiseYWithNoiseZWithNoise(xDisplacementNoise *GKNoise, yDisplacementNoise *GKNoise, zDisplacementNoise *GKNoise)

Displaces all noise values by the values at the same positions of the specified noises. @param xDisplacementNoise The noise from which to displace along the x-axis this noise's values at the same positions. @param yDisplacementNoise The noise from which to displace along the y-axis this noise's values at the same positions. @param zDisplacementNoise The noise from which to displace along the z-axis this noise's values at the same positions.

func (*GKNoise) GradientColors

func (o *GKNoise) GradientColors() *foundation.NSDictionary[*foundation.NSNumber, *appkit.NSColor]

Color gradient of this noise, represented as 'value : color' pairs. Utilized when this noise is rendered to a texture.

func (*GKNoise) Init

func (o *GKNoise) Init() *GKNoise

Initializes a constant noise of 0.0 at all positions.

func (*GKNoise) InitWithNoiseSource

func (o *GKNoise) InitWithNoiseSource(noiseSource *GKNoiseSource) *GKNoise

Initializes a noise with the specified noise source. @param noiseSource The noise source to use to initially populate the 3D noise space.

func (*GKNoise) InitWithNoiseSourceGradientColors

func (o *GKNoise) InitWithNoiseSourceGradientColors(noiseSource *GKNoiseSource, gradientColors *foundation.NSDictionary[*foundation.NSNumber, *appkit.NSColor]) *GKNoise

Initializes a noise with the specified noise source and parameters. @param noiseSource The noise source to use to initially populate the 3D noise space. @param gradientColors The color gradient to use for this noise in 'value : color' pairs.

func (*GKNoise) Invert

func (o *GKNoise) Invert()

Inverts all noise values, from positive to negative and vice versa.

func (*GKNoise) MaximumWithNoise

func (o *GKNoise) MaximumWithNoise(noise *GKNoise)

Takes the maximum value between this noise and the specified noise at each position. @param noise The noise to compare against this noise at each position in determining which to take the maximum value from.

func (*GKNoise) MinimumWithNoise

func (o *GKNoise) MinimumWithNoise(noise *GKNoise)

Takes the minimum value between this noise and the specified noise at each position. @param noise The noise to compare against this noise at each position in determining which to take the minimum value from.

func (*GKNoise) MoveBy

func (o *GKNoise) MoveBy(delta unsafe.Pointer)

Translates all noise values by the specified amount. @param delta The amount by which to move all noise values.

func (*GKNoise) MultiplyWithNoise

func (o *GKNoise) MultiplyWithNoise(noise *GKNoise)

Multiplies all noise values by the noise values at the same position in specified noise. @param noise The noise from which to multiply values to this noise.

func (*GKNoise) RaiseToPower

func (o *GKNoise) RaiseToPower(power float64)

Raises all noise values to the specified power. @param power The power to which to raise all noise values.

func (*GKNoise) RaiseToPowerWithNoise

func (o *GKNoise) RaiseToPowerWithNoise(noise *GKNoise)

Raises all noise values to the power of the value at the same position of the specified noise. @param noise The noise from which to raise this noise's values by.

func (*GKNoise) RemapValuesToCurveWithControlPoints

func (o *GKNoise) RemapValuesToCurveWithControlPoints(controlPoints *foundation.NSDictionary[*foundation.NSNumber, *foundation.NSNumber])

Remaps all noise values to a smooth curve that passes through the specified control points. @param controlPoints Pairs of 'input : output' values to use as control points for the smooth remapping curve. Duplicate input values are not permitted.

func (*GKNoise) RemapValuesToTerracesWithPeaksTerracesInverted

func (o *GKNoise) RemapValuesToTerracesWithPeaksTerracesInverted(peakInputValues *foundation.NSArray[*foundation.NSNumber], inverted bool)

Remaps all noise values to one or more terraces with peaks. Useful for creating valleys and trenches. @param peakInputValues Inputs positions of terrace peaks. @param inverted Governs the curve direction from peak to peak.

func (*GKNoise) RotateBy

func (o *GKNoise) RotateBy(radians unsafe.Pointer)

Rotates all noise values by the specified amount. @param radians The number of radians in x-, y- and z-axes by which to rotate all noise values.

func (*GKNoise) ScaleBy

func (o *GKNoise) ScaleBy(factor unsafe.Pointer)

Scales all noise values by the specified amount. @param factor The factor by which to scale all noise values.

func (*GKNoise) SetGradientColors

func (o *GKNoise) SetGradientColors(gradientColors *foundation.NSDictionary[*foundation.NSNumber, *appkit.NSColor])

func (*GKNoise) ValueAtPosition

func (o *GKNoise) ValueAtPosition(position unsafe.Pointer) float32

The noise value at the specified sample index of the 2D plane. @param position Sample index of the extracted 2D plane at which to query the value @return The noise map value at the specified position.

type GKNoiseMap

type GKNoiseMap struct {
	foundation.NSObject
}

GKNoiseMap represents an extracted portion of sampled points from continuous 3D noise. Extracted values are useful for 2D and 3D games. Noise values may be queried, set to explicit values or used as input for other uses, including textures and tile maps. @see GKNoiseSource @see GKNoise @see SKTexture @see SKTileMapNode

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gknoisemap

func GKNoiseMapFromID

func GKNoiseMapFromID(id objc.ID) *GKNoiseMap

func GKNoiseMapNoiseMapWithNoise

func GKNoiseMapNoiseMapWithNoise(noise *GKNoise) *GKNoiseMap

Initializes a noise map with specified noise. @param noise The 3D noise from which to sample a 2D plane.

func GKNoiseMapNoiseMapWithNoiseSizeOriginSampleCountSeamless

func GKNoiseMapNoiseMapWithNoiseSizeOriginSampleCountSeamless(noise *GKNoise, size unsafe.Pointer, origin unsafe.Pointer, sampleCount unsafe.Pointer, seamless bool) *GKNoiseMap

Initializes a noise map with specified noise and parameters. @param noise The 3D noise from which to sample a 2D plane. @param size The size of the 2D plane to extract from the 3D noise space, in noise space coordinates. @param origin The origin of the 2D plane to extract from the 3D noise space, in noise space coordinates. @param sampleCount The number of equally-spaced samples to make across the 2D plane. @param seamless Whether the values at the edges of the 2D plane are modified to allow seamless tiling of the extracted noise map.

func (*GKNoiseMap) Init

func (o *GKNoiseMap) Init() *GKNoiseMap

Initializes a noise map with constant noise of 0.0 at all positions.

func (*GKNoiseMap) InitWithNoise

func (o *GKNoiseMap) InitWithNoise(noise *GKNoise) *GKNoiseMap

Initializes a noise map with specified noise. @param noise The 3D noise from which to sample a 2D plane.

func (*GKNoiseMap) InitWithNoiseSizeOriginSampleCountSeamless

func (o *GKNoiseMap) InitWithNoiseSizeOriginSampleCountSeamless(noise *GKNoise, size unsafe.Pointer, origin unsafe.Pointer, sampleCount unsafe.Pointer, seamless bool) *GKNoiseMap

Initializes a noise map with specified noise and parameters. @param noise The 3D noise from which to sample a 2D plane. @param size The size of the 2D plane to extract from the 3D noise space, in noise space coordinates. @param origin The origin of the 2D plane to extract from the 3D noise space, in noise space coordinates. @param sampleCount The number of equally-spaced samples to make across the 2D plane. @param seamless Whether the values at the edges of the 2D plane are modified to allow seamless tiling of the extracted noise map.

func (*GKNoiseMap) InterpolatedValueAtPosition

func (o *GKNoiseMap) InterpolatedValueAtPosition(position unsafe.Pointer) float32

The noise map value at the specified sample point of the 2D plane. Returns an interpolated value for points not aligned on integer boundaries. @param position Sample point of the extracted 2D plane at which to query the value. Valid range is from 0.0 to sampleCount-1.0, inclusive. @return The noise map value at the specified sample index. Returns an interpolated value for points not aligned on integer boundaries.

func (*GKNoiseMap) IsSeamless

func (o *GKNoiseMap) IsSeamless() bool

Whether the values at the edges of the 2D plane are modified to allow seamless tiling of the extracted noise map.

func (*GKNoiseMap) Origin

func (o *GKNoiseMap) Origin() unsafe.Pointer

The origin of the 2D plane to extract from the 3D noise space, in noise space coordinates. Used together with size to determine the bounds of the extracted plane. @see size

func (*GKNoiseMap) SampleCount

func (o *GKNoiseMap) SampleCount() unsafe.Pointer

The number of equally-spaced samples to make across the 2D plane. A higher number of samples produces finer resolution at the expense of increased memory.

func (*GKNoiseMap) SetValueAtPosition

func (o *GKNoiseMap) SetValueAtPosition(value float32, position unsafe.Pointer)

Sets the specified value to the noise map at the specified sample index of the 2D plane. @param value The noise map value to assign to the specified position. @param position Sample index of the extracted 2D plane at which to set the value. Valid range is from 0 to sampleCount-1, inclusive.

func (*GKNoiseMap) Size

func (o *GKNoiseMap) Size() unsafe.Pointer

The size of the 2D plane to extract from the 3D noise space, in noise space coordinates. Used together with origin to determine the bounds of the extracted plane. A smaller size captures a more "zoomed in" view of the noise, and vice versa. @see origin

func (*GKNoiseMap) ValueAtPosition

func (o *GKNoiseMap) ValueAtPosition(position unsafe.Pointer) float32

The noise map value at the specified sample index of the 2D plane. @param position Sample index of the extracted 2D plane at which to query the value. Valid range is from 0 to sampleCount-1, inclusive. @return The noise map value at the specified sample index.

type GKNoiseSource

type GKNoiseSource struct {
	foundation.NSObject
}

A GKNoiseSource instance is a description of procedural noise in 3D space. Noise sources generate values between -1.0 and 1.0, inclusive, for any position in continuous 3D space. Subclasses represent specific types of noise, each with their own parameters that affect the nature of the noise. Noise sources are the starting point for generating and using procedural noise. The 3D noise values may be manipulated and combined with the GKNoise class. Portions of this 3D noise can be extracted and utilized via the GKNoiseMap class. Extracted portions of noise are useful in both 2D and 3D games. Applications include creating realistic textures, height maps for 2D and 3D game world terrain, tile maps for 2D games, and intentionally imperfect game object and camera movements in 2D and 3D games. This class is not intended to be instantiated. @see GKNoise @see GKNoiseMap

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gknoisesource

func GKNoiseSourceFromID

func GKNoiseSourceFromID(id objc.ID) *GKNoiseSource

type GKObstacle

type GKObstacle struct {
	foundation.NSObject
}

Represents an impassible area in 2D space. Able to be avoided by GKAgent's steering functions GKGraph can generate navigation graphs from a list of obstacles

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkobstacle

func GKObstacleFromID

func GKObstacleFromID(id objc.ID) *GKObstacle

type GKObstacleGraph

type GKObstacleGraph[NodeType purego.AnyObject] struct {
	GKGraph
}

A collection of GKGraphNodes that are governed by a set of extruded GKPolygonObstacles

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkobstaclegraph

func GKObstacleGraphFromID

func GKObstacleGraphFromID[NodeType purego.AnyObject](id objc.ID) *GKObstacleGraph[NodeType]

func GKObstacleGraphGraphWithObstaclesBufferRadius

func GKObstacleGraphGraphWithObstaclesBufferRadius(obstacles *foundation.NSArray[*GKPolygonObstacle], bufferRadius float32) *GKObstacleGraph[objc.ID]

Creates an optimal bidirectional graph based on a list of obstacles. Each vertex of each obstacle is extruded and a connection is made between each vertex that does not intersect an obstacle Guaranteed not to have any edges which intersect obstacles. Same effect as [[GKObstacleGraph alloc] init], setting bufferRadius, and then calling addObstacles. @param obstacles a list of obstacles to create the graph from @param bufferRadius the circular radius of a potential agent that will navigate this graph. Obstacles are extruded by this amount to create the graph. Must be positive. Negative values are clipped to 0.0f

func GKObstacleGraphGraphWithObstaclesBufferRadiusNodeClass

func GKObstacleGraphGraphWithObstaclesBufferRadiusNodeClass(obstacles *foundation.NSArray[*GKPolygonObstacle], bufferRadius float32, nodeClass objc.Class) *GKObstacleGraph[objc.ID]

Creates an optimal bidirectional graph based on a list of obstacles. Each vertex of each obstacle is extruded and a connection is made between each vertex that does not intersect an obstacle Guaranteed not to have any edges which intersect obstacles. Same effect as [[GKObstacleGraph alloc] init], setting bufferRadius, and then calling addObstacles. @param obstacles a list of obstacles to create the graph from @param bufferRadius the circular radius of a potential agent that will navigate this graph. Obstacles are extruded by this amount to create the graph. Must be positive. Negative values are clipped to 0.0f @param nodeClass the class of the nodes that this graph should create. Must descend from GKGraphNode2D

func (*GKObstacleGraph[NodeType]) AddObstacles

func (o *GKObstacleGraph[NodeType]) AddObstacles(obstacles *foundation.NSArray[*GKPolygonObstacle])

Adds obstacles to this graph. Obstacle is extruded and graph nodes are generated from its vertices and then connected to this graph Nothing is done if an obstacle is already present in this graph Any existing connections that intersect the new obstacles are destroyed unless they are protected with [GKObstacleGraph lockConnection:] @param obstacles an array of obstacles to be added @see lockConnection

func (*GKObstacleGraph[NodeType]) BufferRadius

func (o *GKObstacleGraph[NodeType]) BufferRadius() float32

func (*GKObstacleGraph[NodeType]) ClassForGenericArgumentAtIndex

func (o *GKObstacleGraph[NodeType]) ClassForGenericArgumentAtIndex(index uint) objc.Class

Returns the class of the specified generic index

func (*GKObstacleGraph[NodeType]) ConnectNodeUsingObstacles

func (o *GKObstacleGraph[NodeType]) ConnectNodeUsingObstacles(node NodeType)

Connects the node to this graph by testing edge intersection with existing obstacles. Same behavior as if this node had been present during initWithObstacles. @param node the node to connect

func (*GKObstacleGraph[NodeType]) ConnectNodeUsingObstaclesIgnoringBufferRadiusOfObstacles

func (o *GKObstacleGraph[NodeType]) ConnectNodeUsingObstaclesIgnoringBufferRadiusOfObstacles(node NodeType, obstaclesBufferRadiusToIgnore *foundation.NSArray[*GKPolygonObstacle])

Same behavior as connectNodeUsingObstacles: except you can optionally ignore the bounding radius of certain obstacles from being tested for intersection

func (*GKObstacleGraph[NodeType]) ConnectNodeUsingObstaclesIgnoringObstacles

func (o *GKObstacleGraph[NodeType]) ConnectNodeUsingObstaclesIgnoringObstacles(node NodeType, obstaclesToIgnore *foundation.NSArray[*GKPolygonObstacle])

Same behavior as connectNodeUsingObstacles: except you can optionally ignore certain obstacles from being tested for intersection.

func (*GKObstacleGraph[NodeType]) InitWithObstaclesBufferRadius

func (o *GKObstacleGraph[NodeType]) InitWithObstaclesBufferRadius(obstacles *foundation.NSArray[*GKPolygonObstacle], bufferRadius float32) *GKObstacleGraph[NodeType]

func (*GKObstacleGraph[NodeType]) InitWithObstaclesBufferRadiusNodeClass

func (o *GKObstacleGraph[NodeType]) InitWithObstaclesBufferRadiusNodeClass(obstacles *foundation.NSArray[*GKPolygonObstacle], bufferRadius float32, nodeClass objc.Class) *GKObstacleGraph[NodeType]

func (*GKObstacleGraph[NodeType]) IsConnectionLockedFromNodeToNode

func (o *GKObstacleGraph[NodeType]) IsConnectionLockedFromNodeToNode(startNode NodeType, endNode NodeType) bool

Query if a given connection is locked @param startNode startNode of the connection to query @param endNode endNode of the connection to query @see lockConnection @see unlockConnection @return YES if the connection was locked with lockConnection, NO if it was never locked or was unlocked via unlockConnection

func (*GKObstacleGraph[NodeType]) LockConnectionFromNodeToNode

func (o *GKObstacleGraph[NodeType]) LockConnectionFromNodeToNode(startNode NodeType, endNode NodeType)

Marks a connection as "locked", preventing this connection from being destroyed when you add obstacles that would intersect it @param startNode startNode of the connection to lock @param endNode endNode of the connection to lock

func (*GKObstacleGraph[NodeType]) NodesForObstacle

func (o *GKObstacleGraph[NodeType]) NodesForObstacle(obstacle *GKPolygonObstacle) *foundation.NSArray[NodeType]

Returns an array of the graph nodes associated with a given obstacle @param obstacle the obstacle who's nodes are to be retrieved

func (*GKObstacleGraph[NodeType]) Obstacles

func (o *GKObstacleGraph[NodeType]) Obstacles() *foundation.NSArray[*GKPolygonObstacle]

func (*GKObstacleGraph[NodeType]) RemoveAllObstacles

func (o *GKObstacleGraph[NodeType]) RemoveAllObstacles()

Removes all obstacles from this graph.

func (*GKObstacleGraph[NodeType]) RemoveObstacles

func (o *GKObstacleGraph[NodeType]) RemoveObstacles(obstacles *foundation.NSArray[*GKPolygonObstacle])

Removes obstacles from this graph. All associated graph nodes are removed and their connections are bidirectionally removed. Connections between obstacle nodes that were previously invalidated by any of these obstacles are restored. Nothing is done if an obstacle is already present in this graph @param obstacles an array of obstacles to be removed

func (*GKObstacleGraph[NodeType]) UnlockConnectionFromNodeToNode

func (o *GKObstacleGraph[NodeType]) UnlockConnectionFromNodeToNode(startNode NodeType, endNode NodeType)

"Unlocks" a connection, removing its protection from being destroyed when you add obstacles that would intersect it @param startNode startNode of the connection to unlock @param endNode endNode of the connection to unlock @see lockConnection

type GKOctree

type GKOctree[ElementType purego.AnyObject] struct {
	foundation.NSObject
}

A tree data structure where each level has 8 children that subdivide a given space into the eight octants. Stores arbitrary NSObject elements via points and boxes.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkoctree

func GKOctreeFromID

func GKOctreeFromID[ElementType purego.AnyObject](id objc.ID) *GKOctree[ElementType]

func GKOctreeOctreeWithBoundingBoxMinimumCellSize

func GKOctreeOctreeWithBoundingBoxMinimumCellSize(box GKBox, minCellSize float32) *GKOctree[objc.ID]

Creates a octree with a given bounding box and minimum allowed cell size @param box the bounding box of this octree. all elements bounding boxes must be within this space. @param minCellSize the minimum allowed cell size. The octree will not create octants that have a width,height or depth smaller than this size.

func (*GKOctree[ElementType]) AddElementWithBox

func (o *GKOctree[ElementType]) AddElementWithBox(element ElementType, box GKBox) *GKOctreeNode

Adds an NSObject to this octtree with a given axis-aligned box This element will reside in the lowest node that it's box fits in completely. @param element the element to be stored @param box the box associated with the element to be stored @return the node that the element was added to

func (*GKOctree[ElementType]) AddElementWithPoint

func (o *GKOctree[ElementType]) AddElementWithPoint(element ElementType, point unsafe.Pointer) *GKOctreeNode

Adds an NSObject to this octree with a given point. This element will always reside in the leaf node its point is in. @param element the element to be stored @param point the point associated with the element you want to store @return the node the element was added to

func (*GKOctree[ElementType]) ElementsAtPoint

func (o *GKOctree[ElementType]) ElementsAtPoint(point unsafe.Pointer) *foundation.NSArray[ElementType]

Returns all of the elements in the node this point would be placed in @param point the point to query @return an NSArray of all the element found at the node this point would be placed in

func (*GKOctree[ElementType]) ElementsInBox

func (o *GKOctree[ElementType]) ElementsInBox(box GKBox) *foundation.NSArray[ElementType]

Returns all of the elements that resides in nodes which intersect the given box @param box the box tha specifies which elements you would like to retrieve @return an NSArray of all the elements in all of the nodes that intersect the given box

func (*GKOctree[ElementType]) InitWithBoundingBoxMinimumCellSize

func (o *GKOctree[ElementType]) InitWithBoundingBoxMinimumCellSize(box GKBox, minCellSize float32) *GKOctree[ElementType]

func (*GKOctree[ElementType]) RemoveElement

func (o *GKOctree[ElementType]) RemoveElement(element ElementType) bool

Removes the given NSObject from this octree Note that this is an exhaustive search and is can be slow for larger trees. Cache the relevant GKOctreeNode and use removeElement:WithNode: for better performance. @param element the element to be removed @return returns YES if the data was removed, NO otherwise

func (*GKOctree[ElementType]) RemoveElementWithNode

func (o *GKOctree[ElementType]) RemoveElementWithNode(element ElementType, node *GKOctreeNode) bool

Removes the given NSObject from the given node Note that this is not an exhaustive search and is faster than removeData: @param element the element to be removed @param node the node in which this data resides @return returns YES if the element was removed, NO otherwise

type GKOctreeNode

type GKOctreeNode struct {
	foundation.NSObject
}

The individual node(s) that make up a GKOctree. Used as a hint for faster removal via [GKOctree removeData:WithNode:]

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkoctreenode

func GKOctreeNodeFromID

func GKOctreeNodeFromID(id objc.ID) *GKOctreeNode

func (*GKOctreeNode) Box

func (o *GKOctreeNode) Box() GKBox

type GKPath

type GKPath struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkpath

func GKPathFromID

func GKPathFromID(id objc.ID) *GKPath

func GKPathPathWithFloat3PointsCountRadiusCyclical

func GKPathPathWithFloat3PointsCountRadiusCyclical(points unsafe.Pointer, count uint, radius float32, cyclical bool) *GKPath

func GKPathPathWithGraphNodesRadius

func GKPathPathWithGraphNodesRadius(graphNodes *foundation.NSArray[*GKGraphNode], radius float32) *GKPath

Creates a path from an array of graph nodes (often a result of pathfinding) Accepts GKGraphNode2D and GKGraphNode3D Cyclical is set to NO @param graphNodes an array of graph nodes to make a path from @param radius radius of the path to create @see GKGraphNode

func GKPathPathWithPointsCountRadiusCyclical

func GKPathPathWithPointsCountRadiusCyclical(points unsafe.Pointer, count uint, radius float32, cyclical bool) *GKPath

Creates a path from an array of points @param points an array of points to make a path from @param radius radius of the path to create @param cyclical is the path a cycle that loops back on itself?

func (*GKPath) Float2AtIndex

func (o *GKPath) Float2AtIndex(index uint) unsafe.Pointer

func (*GKPath) Float3AtIndex

func (o *GKPath) Float3AtIndex(index uint) unsafe.Pointer

func (*GKPath) InitWithFloat3PointsCountRadiusCyclical

func (o *GKPath) InitWithFloat3PointsCountRadiusCyclical(points unsafe.Pointer, count uint, radius float32, cyclical bool) *GKPath

func (*GKPath) InitWithGraphNodesRadius

func (o *GKPath) InitWithGraphNodesRadius(graphNodes *foundation.NSArray[*GKGraphNode], radius float32) *GKPath

func (*GKPath) InitWithPointsCountRadiusCyclical

func (o *GKPath) InitWithPointsCountRadiusCyclical(points unsafe.Pointer, count uint, radius float32, cyclical bool) *GKPath

func (*GKPath) IsCyclical

func (o *GKPath) IsCyclical() bool

Does this path loop back on itself, creating a cycle?

func (*GKPath) NumPoints

func (o *GKPath) NumPoints() uint

Number of points in this path

func (*GKPath) PointAtIndex deprecated

func (o *GKPath) PointAtIndex(index uint) unsafe.Pointer

Deprecated: since macOS 10.12.

func (*GKPath) Radius

func (o *GKPath) Radius() float32

Radius of the pathway. Defines a spatial area that the path occupies. This can be though of as the union between rectangles between all points, and circles at each point

func (*GKPath) SetCyclical

func (o *GKPath) SetCyclical(cyclical bool)

func (*GKPath) SetRadius

func (o *GKPath) SetRadius(radius float32)

type GKPerlinNoiseSource

type GKPerlinNoiseSource struct {
	GKCoherentNoiseSource
}

Perlin noise is useful for creating natural-looking textures and realistic-looking terrain.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkperlinnoisesource

func GKPerlinNoiseSourceFromID

func GKPerlinNoiseSourceFromID(id objc.ID) *GKPerlinNoiseSource

func GKPerlinNoiseSourcePerlinNoiseSourceWithFrequencyOctaveCountPersistenceLacunaritySeed

func GKPerlinNoiseSourcePerlinNoiseSourceWithFrequencyOctaveCountPersistenceLacunaritySeed(frequency float64, octaveCount int, persistence float64, lacunarity float64, seed int32) *GKPerlinNoiseSource

func (*GKPerlinNoiseSource) InitWithFrequencyOctaveCountPersistenceLacunaritySeed

func (o *GKPerlinNoiseSource) InitWithFrequencyOctaveCountPersistenceLacunaritySeed(frequency float64, octaveCount int, persistence float64, lacunarity float64, seed int32) *GKPerlinNoiseSource

func (*GKPerlinNoiseSource) Persistence

func (o *GKPerlinNoiseSource) Persistence() float64

func (*GKPerlinNoiseSource) SetPersistence

func (o *GKPerlinNoiseSource) SetPersistence(persistence float64)

type GKPolygonObstacle

type GKPolygonObstacle struct {
	GKObstacle
}

An obstacle with an impassible closed polygon

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkpolygonobstacle

func GKPolygonObstacleFromID

func GKPolygonObstacleFromID(id objc.ID) *GKPolygonObstacle

func GKPolygonObstacleObstacleWithPointsCount

func GKPolygonObstacleObstacleWithPointsCount(points unsafe.Pointer, numPoints uint) *GKPolygonObstacle

Creates a polygon obstacle with an array of points. @param points array of points in counter-clockwise order that are the vertices of a convex polygon @param numPoints the number of points in the array

func (*GKPolygonObstacle) InitWithPointsCount

func (o *GKPolygonObstacle) InitWithPointsCount(points unsafe.Pointer, numPoints uint) *GKPolygonObstacle

func (*GKPolygonObstacle) VertexAtIndex

func (o *GKPolygonObstacle) VertexAtIndex(index uint) unsafe.Pointer

Returns the vertex at the indicated index @param index index of the vertex to retrieve

func (*GKPolygonObstacle) VertexCount

func (o *GKPolygonObstacle) VertexCount() uint

Number of vertices on this polygon

type GKQuad

type GKQuad struct {
	QuadMin unsafe.Pointer
	QuadMax unsafe.Pointer
}

Representation of an axis aligned quad via its min corner (lower-left) and max corner (upper-right)

type GKQuadtree

type GKQuadtree[ElementType purego.AnyObject] struct {
	foundation.NSObject
}

A tree data structure where each level has 4 children that subdivide a given space into the four quadrants. Stores arbitrary NSObject data via points and quads.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkquadtree

func GKQuadtreeFromID

func GKQuadtreeFromID[ElementType purego.AnyObject](id objc.ID) *GKQuadtree[ElementType]

func GKQuadtreeQuadtreeWithBoundingQuadMinimumCellSize

func GKQuadtreeQuadtreeWithBoundingQuadMinimumCellSize(quad GKQuad, minCellSize float32) *GKQuadtree[objc.ID]

Creates a quadtree with a bounding quad and minimum allowed cell size @param quad the quad that specifies of the bounds of this quadtree. Elements must only be within these bounds. @param minCellSize the minimum allowed cell size. The quadtree will not create quadrants that have a width or height smaller than this size.

func (*GKQuadtree[ElementType]) AddElementWithPoint

func (o *GKQuadtree[ElementType]) AddElementWithPoint(element ElementType, point unsafe.Pointer) *GKQuadtreeNode

Adds an NSObject to this quadtree with a given point. This data will always reside in the leaf node its point is in. @param element the element to store @param point the point associated with the element you want to store @return the quadtree node the element was added to

func (*GKQuadtree[ElementType]) AddElementWithQuad

func (o *GKQuadtree[ElementType]) AddElementWithQuad(element ElementType, quad GKQuad) *GKQuadtreeNode

Adds an NSObject to this quadtree with a given quad. This data will reside in the lowest node that its quad fits in completely. @param element the element to store @param quad the quad associated with the element you want to store @return the quad tree node the element was added to

func (*GKQuadtree[ElementType]) ElementsAtPoint

func (o *GKQuadtree[ElementType]) ElementsAtPoint(point unsafe.Pointer) *foundation.NSArray[ElementType]

Returns all of the elements in the quadtree node this point would be placed in @param point the point to query @return an NSArray of all the data found at the quad tree node this point would be placed in

func (*GKQuadtree[ElementType]) ElementsInQuad

func (o *GKQuadtree[ElementType]) ElementsInQuad(quad GKQuad) *foundation.NSArray[ElementType]

Returns all of the elements that resides in quad tree nodes which intersect the given quad @param quad the quad you want to test @return an NSArray of all the elements in all of the nodes that intersect the given quad

func (*GKQuadtree[ElementType]) InitWithBoundingQuadMinimumCellSize

func (o *GKQuadtree[ElementType]) InitWithBoundingQuadMinimumCellSize(quad GKQuad, minCellSize float32) *GKQuadtree[ElementType]

func (*GKQuadtree[ElementType]) RemoveElement

func (o *GKQuadtree[ElementType]) RemoveElement(element ElementType) bool

Removes the given NSObject from this quad tree. Note that this is an exhaustive search and is slow. Cache the relevant GKQuadTreeNode and use removeElement:WithNode: for better performance. @param element the data to be removed @return returns YES if the data was removed, NO otherwise

func (*GKQuadtree[ElementType]) RemoveElementWithNode

func (o *GKQuadtree[ElementType]) RemoveElementWithNode(data ElementType, node *GKQuadtreeNode) bool

Removes the given NSObject from the given quadtree node Note that this is not an exhaustive search and is faster than removeData: @param data the data to be removed @param node the node in which this data resides @return returns YES if the data was removed, NO otherwise

type GKQuadtreeNode

type GKQuadtreeNode struct {
	foundation.NSObject
}

The individual node(s) that make up a GKQuadtree. Used as a hint for faster removal via [GKQuadtree removeData:WithNode:]

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkquadtreenode

func GKQuadtreeNodeFromID

func GKQuadtreeNodeFromID(id objc.ID) *GKQuadtreeNode

func (*GKQuadtreeNode) Quad

func (o *GKQuadtreeNode) Quad() GKQuad

type GKRTree

type GKRTree[ElementType purego.AnyObject] struct {
	foundation.NSObject
}

An R-tree is a data structure that partitions axis aligned bounding rectangles into groups spatially. When a group goes to large, it is split according to its split strategy into two new groups. Fast queries can be made on these partition bounding rectangles.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkrtree

func GKRTreeFromID

func GKRTreeFromID[ElementType purego.AnyObject](id objc.ID) *GKRTree[ElementType]

func GKRTreeTreeWithMaxNumberOfChildren

func GKRTreeTreeWithMaxNumberOfChildren(maxNumberOfChildren uint) *GKRTree[objc.ID]

Creates an RTree with a given maximum number of children per node. Nodes that grow beyond this number of children will be split. @param maxNumberOfChildren the maximum number of children per node before splitting

func (*GKRTree[ElementType]) AddElementBoundingRectMinBoundingRectMaxSplitStrategy

func (o *GKRTree[ElementType]) AddElementBoundingRectMinBoundingRectMaxSplitStrategy(element ElementType, boundingRectMin unsafe.Pointer, boundingRectMax unsafe.Pointer, splitStrategy GKRTreeSplitStrategy)

Adds an element with the specified bounding rect to this RTree. The supplied splitting strategy is used if the node this element would be added to needs to be split. @param element the element to be added @param boundingRectMin the min point (lower left) on the bounding rect of the element to be added @param boundingRectMax the min point (upper right) on the bounding rect of the element to be added @param splitStrategy the splitting strategy to be used if the node this element would be added to needs to be split

func (*GKRTree[ElementType]) ElementsInBoundingRectMinRectMax

func (o *GKRTree[ElementType]) ElementsInBoundingRectMinRectMax(rectMin unsafe.Pointer, rectMax unsafe.Pointer) *foundation.NSArray[ElementType]

Queries all the elements that are in this RTree within the given bounding rect. @param rectMin the min point (lower left) of the rect to query @param rectMax the max point (upper right) of the rect to query @return an NSArray of all of the elements that fall within the query rect

func (*GKRTree[ElementType]) InitWithMaxNumberOfChildren

func (o *GKRTree[ElementType]) InitWithMaxNumberOfChildren(maxNumberOfChildren uint) *GKRTree[ElementType]

func (*GKRTree[ElementType]) QueryReserve

func (o *GKRTree[ElementType]) QueryReserve() uint

Amount of array items to reserve before a query. This improves query performance at the cost of memory

func (*GKRTree[ElementType]) RemoveElementBoundingRectMinBoundingRectMax

func (o *GKRTree[ElementType]) RemoveElementBoundingRectMinBoundingRectMax(element ElementType, boundingRectMin unsafe.Pointer, boundingRectMax unsafe.Pointer)

Removes an element with the specified bounding rect from this RTree. @param element the element to be removed @param boundingRectMin the min point (lower left) on the bounding rect of the element to be removed @param boundingRectMax the min point (upper right) on the bounding rect of the element to be removed

func (*GKRTree[ElementType]) SetQueryReserve

func (o *GKRTree[ElementType]) SetQueryReserve(queryReserve uint)

type GKRTreeSplitStrategy

type GKRTreeSplitStrategy int64
const (
	GKRTreeSplitStrategyHalve         GKRTreeSplitStrategy = 0
	GKRTreeSplitStrategyLinear        GKRTreeSplitStrategy = 1
	GKRTreeSplitStrategyQuadratic     GKRTreeSplitStrategy = 2
	GKRTreeSplitStrategyReduceOverlap GKRTreeSplitStrategy = 3
)

func (GKRTreeSplitStrategy) String

func (e GKRTreeSplitStrategy) String() string

type GKRandom

type GKRandom interface {
	NextInt() int
	NextIntWithUpperBound(upperBound uint) uint
	NextUniform() float32
	NextBool() bool
}

GKRandom wraps the ObjC protocol GKRandom.

type GKRandomDistribution

type GKRandomDistribution struct {
	foundation.NSObject
}

A random distribution is a random source itself with a specific mapping from the input source to the output values. The distribution is uniform, meaning there is no bias towards any of the possible outcomes.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkrandomdistribution

func GKRandomDistributionD6

func GKRandomDistributionD6() *GKRandomDistribution

Convenience creation for the very common d6 range [1, 6] with an isolated random source shielded from outside sources.

func GKRandomDistributionD20

func GKRandomDistributionD20() *GKRandomDistribution

Convenience creation for the very common d20 range [1, 20] with an isolated random source shielded from outside sources.

func GKRandomDistributionDistributionForDieWithSideCount

func GKRandomDistributionDistributionForDieWithSideCount(sideCount int) *GKRandomDistribution

Convenience creation of random distribution with the die like range [1, sideCount] using an isolated source to grab input values from. This is equivalent to calling alloc followed by initWithSource:lowest:highest:, where source is [[GKRandomSource alloc] init]. @see initWithRandomSource:lowestValue:highestValue:

func GKRandomDistributionDistributionWithLowestValueHighestValue

func GKRandomDistributionDistributionWithLowestValueHighestValue(lowestInclusive int, highestInclusive int) *GKRandomDistribution

Convenience creation of random distribution within the range [lowest, highest] using an isolated source to grab input values from. This is equivalent to calling alloc followed by initWithSource:lowest:highest:, where source is [[GKRandomSource alloc] init]. @see initWithRandomSource:lowestValue:highestValue:

func GKRandomDistributionFromID

func GKRandomDistributionFromID(id objc.ID) *GKRandomDistribution

func (*GKRandomDistribution) HighestValue

func (o *GKRandomDistribution) HighestValue() int

The highest value the distribution will output.

func (*GKRandomDistribution) InitWithRandomSourceLowestValueHighestValue

func (o *GKRandomDistribution) InitWithRandomSourceLowestValueHighestValue(source GKRandom, lowestInclusive int, highestInclusive int) *GKRandomDistribution

Initializes a random distribution within the range [lowest, highest] using a source to grab input values from.

func (*GKRandomDistribution) LowestValue

func (o *GKRandomDistribution) LowestValue() int

The lowest value the distribution will output.

func (*GKRandomDistribution) NextBool

func (o *GKRandomDistribution) NextBool() bool

Returns the next true or false value in the distribution sequence and moves ahead to the next one. The value is either nonzero (true) or zero (false). Use this for simple boolean switches in logic that don't require fuzzy evaluation. For fuzzy evaluation use nextUniform. By default this is based on the referenced source's definition of nextBool. @see GKRandomSource.nextBool

func (*GKRandomDistribution) NextInt

func (o *GKRandomDistribution) NextInt() int

Returns the next integer in the distribution sequence and moves ahead to the next one. The value is in the range of [lowest, highest].

func (*GKRandomDistribution) NextIntWithUpperBound

func (o *GKRandomDistribution) NextIntWithUpperBound(upperBound uint) uint

Returns the next unsigned value in the distribution sequence that is less than upperBound. The value never equals or exceeeds upperBounds, and in this case it will also never exceed the highest value of the distribution.

func (*GKRandomDistribution) NextUniform

func (o *GKRandomDistribution) NextUniform() float32

Returns the next uniform float in the random sequence and moves ahead to the next one. The value is in the range of [lowest / higest, 1.0]. The value is quantized to the distribution's lowest and highest bounds. Thus on a d20 distribution the value is quantized to 5% increments. The output value 0 is not possible to get unless the lowest value bound is also 0 or below. @see nextInt

func (*GKRandomDistribution) NumberOfPossibleOutcomes

func (o *GKRandomDistribution) NumberOfPossibleOutcomes() uint

The number of unique possible outcomes, depending on the distribution type this is not always highest - lowest + 1.

type GKRandomSource

type GKRandomSource struct {
	foundation.NSObject
}

A concrete random source that can generate random numbers. The implementation details are up to the system and if a particular algorithm is needed then use one of the provided subclasses. For certain specialized applications a shared system source may be needed and for those instances there is a wrapped interface over arc4random_*, accessible via +[GKRandomSource sharedRandom]. @see GKARC4RandomSource @see GKLinearCongruentialRandomSource @see GKMersenneTwisterRandomSource @see GKRandomSource.systemRandom

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkrandomsource

func GKRandomSourceFromID

func GKRandomSourceFromID(id objc.ID) *GKRandomSource

func GKRandomSourceSharedRandom

func GKRandomSourceSharedRandom() *GKRandomSource

Returns a shared instance of a random source that uses the system's underlying random source. Using this instance modifies the outcome of future calls to the arc4random family of C calls. It is also affected by calls to the C apis and should not be used for sources that are intended to be deterministic. @discussion Note that while it may seem semantically similar to a GKARC4RandomSource, this is not a drop in replacement.

func (*GKRandomSource) ArrayByShufflingObjectsInArray

func (o *GKRandomSource) ArrayByShufflingObjectsInArray(array *foundation.NSArray[objc.ID]) *foundation.NSArray[objc.ID]

Returns a shuffled instance of the given array. The objects in the array are shuffled based on a Fisher-Yates shuffle. Any random, be it custom, source or a distribution, that can provide a number with an upper bound of at least the array.count is suitable for this shuffle.

func (*GKRandomSource) Init

func (o *GKRandomSource) Init() *GKRandomSource

Creates a new random source initialized using bits from an entropy source like SecRandomCopyBytes. When used directly from the base class; this source is deterministic and performant but the underlying implementation details are not specified. Use a subclass with a specific algorithm implementation guaranteed if your application requires very stringent random source charateristics. @see GKARC4RandomSource @see GKLinearCongruentialRandomSource @see GKMersenneTwisterRandomSource

func (*GKRandomSource) InitWithCoder

func (o *GKRandomSource) InitWithCoder(aDecoder *foundation.NSCoder) *GKRandomSource

Deserializes a random source from an NSCoder. All random sources support coding for serializing and deserializing the state of the random source. Each subclass has its own contract for what parts of the state is preserved when serialized but the general contract is that a serialized source must generate the same sequence of values as the original source would from the instant it was serialized. Note that the sharedRandom instance is an exception as it is explicitly seedless and a shared singleton instance. When serialized and deserialized it will return the current sharedRandom instance instead.

type GKRidgedNoiseSource

type GKRidgedNoiseSource struct {
	GKCoherentNoiseSource
}

Ridged noise is similar to Perlin noise, with sharply-defined, relatively thin peaks.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkridgednoisesource

func GKRidgedNoiseSourceFromID

func GKRidgedNoiseSourceFromID(id objc.ID) *GKRidgedNoiseSource

func GKRidgedNoiseSourceRidgedNoiseSourceWithFrequencyOctaveCountLacunaritySeed

func GKRidgedNoiseSourceRidgedNoiseSourceWithFrequencyOctaveCountLacunaritySeed(frequency float64, octaveCount int, lacunarity float64, seed int32) *GKRidgedNoiseSource

func (*GKRidgedNoiseSource) InitWithFrequencyOctaveCountLacunaritySeed

func (o *GKRidgedNoiseSource) InitWithFrequencyOctaveCountLacunaritySeed(frequency float64, octaveCount int, lacunarity float64, seed int32) *GKRidgedNoiseSource

type GKRule

type GKRule struct {
	foundation.NSObject
}

The concrete class that the GKRuleSystem uses to evaluate the current state and facts with predicated rules. These are sharable between systems, so don't retain any state in the rules themselves. Use the system-provided state storage. @see GKRuleSystem.state

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkrule

func GKRuleFromID

func GKRuleFromID(id objc.ID) *GKRule

func GKRuleRuleWithBlockPredicateAction

func GKRuleRuleWithBlockPredicateAction(predicate func(*GKRuleSystem) bool, action func(*GKRuleSystem)) *GKRule

Short hand for making a rule that uses blocks for the predicate and action. This rule is not able to be archived using NSKeyedArchiver so use a subclass or NSPredicate based rule if serialization of the rule is needed.

func GKRuleRuleWithPredicateAssertingFactGrade

func GKRuleRuleWithPredicateAssertingFactGrade(predicate *foundation.NSPredicate, fact foundation.NSObjectProtocol, grade float32) *GKRule

Create a data-driven rule that uses NSPredicate and a single assert as the action.

func GKRuleRuleWithPredicateRetractingFactGrade

func GKRuleRuleWithPredicateRetractingFactGrade(predicate *foundation.NSPredicate, fact foundation.NSObjectProtocol, grade float32) *GKRule

Short hand for data-driven rule that uses NSPredicate and a single retract as the action.

func (*GKRule) EvaluatePredicateWithSystem

func (o *GKRule) EvaluatePredicateWithSystem(system *GKRuleSystem) bool

Called by the rule system when it is this rule's turn to be evaluated. If the predicate returns YES then the action for the rule will be performed. Once the action is performed the rule will move to the system's executed list until the agenda is reset. @see performAction @see GKRuleSystem.agenda @see GKRuleSystem.executed @see GKRuleSystem.reset @return YES is the predicate passes and the action needs to be performed, NO otherwise.

func (*GKRule) PerformActionWithSystem

func (o *GKRule) PerformActionWithSystem(system *GKRuleSystem)

Performs the action consequence for the rule. This will only be called if the predicate evaluates to YES. Any facts asserted or retracted by the action on the system will cause the system to evaluate the agenda rule set again once the action completes.

func (*GKRule) Salience

func (o *GKRule) Salience() int

Salience defines the order in the rule agenda that the system will evaluate. A rule with higher salience will be evaluated before another rule in the agenda that has a lower salience. Defaults to 0. @see GKRuleSystem.agenda

func (*GKRule) SetSalience

func (o *GKRule) SetSalience(salience int)

type GKRuleSystem

type GKRuleSystem struct {
	foundation.NSObject
}

A rule system consists of 3 things: - The current state, which upon creation is considered the inital state. - The current set of rules. - The current set of facts. Each time a fact is added to the system, the set of rules are evaluated in order and their actions executed in the system if their predicates are true. Rules can be fuzzy, allowing predicates and facts to be asserted to a degree of confidence instead of just boolean on/off. The facts can be any kind of objects as long as they correctly determine equality using isEqual: The simplest approach is to use strings or dictionaries as they provide the most flexibility in defining facts, but user defined classes work just as well and may describe the problem space better. The fact set is at all times a fuzzy set, as defined by fact membership in the set being modulated by their grade of membership. The rules may use the grade of membership to predicate their actions and in such a manner create fuzzy logic. The fuzzy logic Zadeh operators are available on the system itself in order to query multiple facts for combined membership grade.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkrulesystem

func GKRuleSystemFromID

func GKRuleSystemFromID(id objc.ID) *GKRuleSystem

func (*GKRuleSystem) AddRule

func (o *GKRuleSystem) AddRule(rule *GKRule)

Adds a rule to the system. Also adds it to the agenda in salience order.

func (*GKRuleSystem) AddRulesFromArray

func (o *GKRuleSystem) AddRulesFromArray(rules *foundation.NSArray[*GKRule])

Adds rules to the system. Also adds them to the agenda in salience order.

func (*GKRuleSystem) Agenda

func (o *GKRuleSystem) Agenda() *foundation.NSArray[*GKRule]

The current set of rules to be evaluated, in salience order, where if the salience is equivalent the order of insertion into the agenda is used to decide which is first. Adjust salience of your rules to adjust the order the next time the agenda is reset. Changing salience on a rule currently in the agenda does not change its order in the agenda. This is at all times the difference between the rules and executed sets. @see rules @see executed @see reset

func (*GKRuleSystem) AssertFact

func (o *GKRuleSystem) AssertFact(fact foundation.NSObjectProtocol)

Asserts a fact with membership grade of 1.0. This will cause the current rules to be evaluated, which may in turn assert or retract more facts or change the state of the system. This is shorthand for calling assertFact:grade: with a grade of 1.0 @see assertFact:grade: @see evaluate @see NSObject.isEqual:

func (*GKRuleSystem) AssertFactGrade

func (o *GKRuleSystem) AssertFactGrade(fact foundation.NSObjectProtocol, grade float32)

Asserts a fact with the supplied membership grade. This will cause the current rules to be evaluated, which may in turn assert or retract more facts or change the state of the system. @see evaluate

func (*GKRuleSystem) Evaluate

func (o *GKRuleSystem) Evaluate()

Explicitly evaluate the agenda of the rule system based on the current state and the current set of facts. This may in turn assert or retract more facts or change the state of the system, including activating more rules in the agenda.

func (*GKRuleSystem) Executed

func (o *GKRuleSystem) Executed() *foundation.NSArray[*GKRule]

The current set of rules that have already executed. Rules in this set will not be executed again until the system is reset. This is at all times the difference between the rules and agenda sets. @see rules @see agenda @see reset

func (*GKRuleSystem) Facts

func (o *GKRuleSystem) Facts() *foundation.NSArray[objc.ID]

The current set of facts. Facts have a grade of membership that is >= 0.0. Query the system for the individual grades of membership with gradeForFact: @see gradeForFact:

func (*GKRuleSystem) GradeForFact

func (o *GKRuleSystem) GradeForFact(fact foundation.NSObjectProtocol) float32

Returns the current membership grade for the given fact, which is 0.0 if the fact is not a member of the current set of facts. @return The membership grade of the given fact, in the range [0.0, 1.0].

func (*GKRuleSystem) Init

func (o *GKRuleSystem) Init() *GKRuleSystem

Initializes a clean rule system with no state, rules or facts.

func (*GKRuleSystem) MaximumGradeForFacts

func (o *GKRuleSystem) MaximumGradeForFacts(facts *foundation.NSArray[objc.ID]) float32

Returns the maximum membership grade for the any one of the given facts. This performs the logical OR operation between the given facts. @return The membership grade by applying the OR operator on the given facts, in the range [0.0, 1.0].

func (*GKRuleSystem) MinimumGradeForFacts

func (o *GKRuleSystem) MinimumGradeForFacts(facts *foundation.NSArray[objc.ID]) float32

Returns the combined membership grade for the all the given facts. This performs the logical AND operation between the given facts. @return The membership grade by applying the AND operator on the given facts, in the range [0.0, 1.0].

func (*GKRuleSystem) RemoveAllRules

func (o *GKRuleSystem) RemoveAllRules()

Removes all rules from the system. This also removes them from the agenda and executed sets.

func (*GKRuleSystem) Reset

func (o *GKRuleSystem) Reset()

Clears the agenda and executed sets and removes all facts currently in the system. It then fills the agenda with rules from the rule set, in salience order. @see rules @see facts

func (*GKRuleSystem) RetractFact

func (o *GKRuleSystem) RetractFact(fact foundation.NSObjectProtocol)

Retracts a fact, setting its membership grade to 0, which also removes it from the fact set. This will cause the current rules to be evaluated, which may in turn assert or retract more facts or change the state of the system. This is short hand for calling retractFact:grade: with a grade of 1.0 @see retractFact:grade: @see evaluate

func (*GKRuleSystem) RetractFactGrade

func (o *GKRuleSystem) RetractFactGrade(fact foundation.NSObjectProtocol, grade float32)

Retracts a fact, reducing its membership grade by the supplied grade. If this brings the grade to 0 it is also removed from the fact set. This will cause the current rules to be evaluated, which may in turn assert or retract more facts or change the state of the system. @see evaluate

func (*GKRuleSystem) Rules

func (o *GKRuleSystem) Rules() *foundation.NSArray[*GKRule]

The current set of rules that will be used to set the agenda when rules are first added to the system. They will also be used to refill the agenda whenever it is set. This is at all times the union of the agenda and executed sets. @see agenda @see executed

func (*GKRuleSystem) State

The implementation-defined state. If any changes are made on this outside the system you must call evaluate to have the system take account of the changes. @see evaluate

type GKSCNNodeComponent

type GKSCNNodeComponent struct {
	GKComponent
}

A component that encapsulates a SceneKit node.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkscnnodecomponent

func GKSCNNodeComponentComponentWithNode

func GKSCNNodeComponentComponentWithNode(node *scenekit.SCNNode) *GKSCNNodeComponent

Creates a component that encapsulate the given SceneKit node. When the component is added to an entity, the SCNNode's entity property will be set. @param node Node to associate with the component. @see SCNNode.entity

func GKSCNNodeComponentFromID

func GKSCNNodeComponentFromID(id objc.ID) *GKSCNNodeComponent

func (*GKSCNNodeComponent) InitWithNode

func (o *GKSCNNodeComponent) InitWithNode(node *scenekit.SCNNode) *GKSCNNodeComponent

Initializes component to encapsulate the given SceneKit node. When the component is added to an entity, the SCNNode's entity property will be set. @param node Node to associate with the component. @see SCNNode.entity

func (*GKSCNNodeComponent) Node

func (o *GKSCNNodeComponent) Node() *scenekit.SCNNode

type GKSKNodeComponent

type GKSKNodeComponent struct {
	GKComponent
}

A component that encapsulates a SpriteKit node.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gksknodecomponent

func GKSKNodeComponentComponentWithNode

func GKSKNodeComponentComponentWithNode(node *spritekit.SKNode) *GKSKNodeComponent

Creates a component that encapsulate the given SpriteKit node. When the component is added to an entity, the SKNode's entity property will be set. @param node Node to associate with the component. @see SKNode.entity

func GKSKNodeComponentFromID

func GKSKNodeComponentFromID(id objc.ID) *GKSKNodeComponent

func (*GKSKNodeComponent) InitWithNode

func (o *GKSKNodeComponent) InitWithNode(node *spritekit.SKNode) *GKSKNodeComponent

Initializes component to encapsulate the given SpriteKit node. When the component is added to an entity, the SKNode's entity property will be set. @param node Node to associate with the component. @see SKNode.entity

func (*GKSKNodeComponent) Node

func (o *GKSKNodeComponent) Node() *spritekit.SKNode

func (*GKSKNodeComponent) SetNode

func (o *GKSKNodeComponent) SetNode(node *spritekit.SKNode)

type GKScene

type GKScene struct {
	foundation.NSObject
}

A scene stores and handles loading of data related to a particular scene.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkscene

func GKSceneFromID

func GKSceneFromID(id objc.ID) *GKScene

func GKSceneSceneWithFileNamed

func GKSceneSceneWithFileNamed(filename *foundation.NSString) *GKScene

Loads a scene from a file contained within the bundle.

func GKSceneSceneWithFileNamedRootNode

func GKSceneSceneWithFileNamedRootNode(filename *foundation.NSString, rootNode GKSceneRootNodeType) *GKScene

Loads a scene from a file contained within the bundle and link with the specified rootNode.

func (*GKScene) AddEntity

func (o *GKScene) AddEntity(entity *GKEntity)

Adds an entity to the scene's list of entities. @param entity the entity to add.

func (*GKScene) AddGraphName

func (o *GKScene) AddGraphName(graph *GKGraph, name *foundation.NSString)

Adds a graph to the scene's list of graphs. @param graph the graph to add.

func (*GKScene) Entities

func (o *GKScene) Entities() *foundation.NSArray[*GKEntity]

The entities of this scene.

func (*GKScene) Graphs

The navigational graphs of this scene.

func (*GKScene) RemoveEntity

func (o *GKScene) RemoveEntity(entity *GKEntity)

Removes an entity from the scene's list of entities. @param entity the entity to remove.

func (*GKScene) RemoveGraph

func (o *GKScene) RemoveGraph(name *foundation.NSString)

Removes a graph from the scene's list of graphs. @param name the name of the corresponding graph as added via addGraph:

func (*GKScene) RootNode

func (o *GKScene) RootNode() GKSceneRootNodeType

The root node for the scene. @see GKSceneRootNodeType

func (*GKScene) SetRootNode

func (o *GKScene) SetRootNode(rootNode GKSceneRootNodeType)

type GKSceneRootNodeType

type GKSceneRootNodeType interface {
}

GKSceneRootNodeType wraps the ObjC protocol GKSceneRootNodeType.

type GKShuffledDistribution

type GKShuffledDistribution struct {
	GKRandomDistribution
}

A shuffled distribution tries to make sure individual samples are not clustered whilst retaining a uniform distribution of values over time. This is often referred to as fair or less random, as the predicatability of the outcomes in a series is vastly increased, yet the distribution of values is uniform. Do not use with distributions ranging more than 256 between lowest and highest as the shuffling seqeunce is stored internally in memory.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkshuffleddistribution

func GKShuffledDistributionFromID

func GKShuffledDistributionFromID(id objc.ID) *GKShuffledDistribution

type GKSphereObstacle

type GKSphereObstacle struct {
	GKObstacle
}

An obstacle with an impassible radius in 3D space For use with GKAgent3D. Using this with a GKAgent2D is no different than using GKCircleObstacle.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gksphereobstacle

func GKSphereObstacleFromID

func GKSphereObstacleFromID(id objc.ID) *GKSphereObstacle

func GKSphereObstacleObstacleWithRadius

func GKSphereObstacleObstacleWithRadius(radius float32) *GKSphereObstacle

func (*GKSphereObstacle) InitWithRadius

func (o *GKSphereObstacle) InitWithRadius(radius float32) *GKSphereObstacle

func (*GKSphereObstacle) Position

func (o *GKSphereObstacle) Position() unsafe.Pointer

Position of the center of the circle in 3D space.

func (*GKSphereObstacle) Radius

func (o *GKSphereObstacle) Radius() float32

Radius of the impassible circle

func (*GKSphereObstacle) SetPosition

func (o *GKSphereObstacle) SetPosition(position unsafe.Pointer)

func (*GKSphereObstacle) SetRadius

func (o *GKSphereObstacle) SetRadius(radius float32)

type GKSpheresNoiseSource

type GKSpheresNoiseSource struct {
	GKNoiseSource
}

Produces 3D spherical noise with an infinite number of spheres-within-spheres of constantly-increasing radius.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkspheresnoisesource

func GKSpheresNoiseSourceFromID

func GKSpheresNoiseSourceFromID(id objc.ID) *GKSpheresNoiseSource

func GKSpheresNoiseSourceSpheresNoiseWithFrequency

func GKSpheresNoiseSourceSpheresNoiseWithFrequency(frequency float64) *GKSpheresNoiseSource

func (*GKSpheresNoiseSource) Frequency

func (o *GKSpheresNoiseSource) Frequency() float64

func (*GKSpheresNoiseSource) InitWithFrequency

func (o *GKSpheresNoiseSource) InitWithFrequency(frequency float64) *GKSpheresNoiseSource

func (*GKSpheresNoiseSource) SetFrequency

func (o *GKSpheresNoiseSource) SetFrequency(frequency float64)

type GKState

type GKState struct {
	foundation.NSObject
}

Represents a single state in a state machine. By default, states allow transitions freely to and from the states in the machine. If a more restricted set of valid transitions are needed in the state machine, you may override isValidNextState: where applicable. @see GKStateMachine @see isValidNextState:

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkstate

func GKStateFromID

func GKStateFromID(id objc.ID) *GKState

func GKStateState

func GKStateState() *GKState

Creates a new state to be used in a state machine. @see GKStateMachine

func (*GKState) DidEnterWithPreviousState

func (o *GKState) DidEnterWithPreviousState(previousState *GKState)

Called by GKStateMachine when this state is entered. @param previousState the state that was exited to enter this state. This is nil if this is the state machine's first entered state. @see stateMachineWithStates:initialStateClass:

func (*GKState) Init

func (o *GKState) Init() *GKState

func (*GKState) IsValidNextState

func (o *GKState) IsValidNextState(stateClass objc.Class) bool

Returns YES if the given class is a valid next state to enter. By default GKState will return YES for any class that is subclass of GKState. Override this in a subclass to enforce limited edge traversals in the state machine. @see GKStateMachine.canEnterState: @see GKStateMachine.enterState: @param stateClass the class to be checked @return YES if the class is kind of GKState and the state transition is valid, else NO.

func (*GKState) StateMachine

func (o *GKState) StateMachine() *GKStateMachine

The state machine that this state is associated with. This is nil if this state hasn't been added to a state machine yet.

func (*GKState) UpdateWithDeltaTime

func (o *GKState) UpdateWithDeltaTime(seconds float64)

Called by GKStateMachine when it is updated @param seconds the time in seconds since the last update

func (*GKState) WillExitWithNextState

func (o *GKState) WillExitWithNextState(nextState *GKState)

Called by GKStateMachine when this state is exited @param nextState the state that is being entered next

type GKStateMachine

type GKStateMachine struct {
	foundation.NSObject
}

Models a finite state machine that has a single current state.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkstatemachine

func GKStateMachineFromID

func GKStateMachineFromID(id objc.ID) *GKStateMachine

func GKStateMachineStateMachineWithStates

func GKStateMachineStateMachineWithStates(states *foundation.NSArray[*GKState]) *GKStateMachine

Creates a state machine with an array of possible states and an initial state. @param states a list of possible states for this state machine.

func (*GKStateMachine) CanEnterState

func (o *GKStateMachine) CanEnterState(stateClass objc.Class) bool

Returns YES if the indicated class is a a valid next state or if currentState is nil @param stateClass the class of the state to be tested

func (*GKStateMachine) CurrentState

func (o *GKStateMachine) CurrentState() *GKState

The current state that the state machine is in. Prior to the first called to enterState this is equal to nil.

func (*GKStateMachine) EnterState

func (o *GKStateMachine) EnterState(stateClass objc.Class) bool

Calls canEnterState to check if we can enter the given state and then enters that state if so. [GKState willExitWithNextState:] is called on the old current state. [GKState didEnterWithPreviousState:] is called on the new state. @param stateClass the class of the state to switch to @return YES if state was entered. NO otherwise.

func (*GKStateMachine) InitWithStates

func (o *GKStateMachine) InitWithStates(states *foundation.NSArray[*GKState]) *GKStateMachine

func (*GKStateMachine) StateForClass

func (o *GKStateMachine) StateForClass(stateClass objc.Class) *GKState

Gets the instance of the indicated state class from this state machine. Returns nil if the state does not exist @param stateClass the class of the state to be retrieved

func (*GKStateMachine) UpdateWithDeltaTime

func (o *GKStateMachine) UpdateWithDeltaTime(sec float64)

Updates the current state machine. @param sec the time, in seconds, since the last frame

type GKStrategist

type GKStrategist interface {
	BestMoveForActivePlayer() GKGameModelUpdate
	GameModel() GKGameModel
	SetGameModel(gameModel GKGameModel)
	RandomSource() GKRandom
	SetRandomSource(randomSource GKRandom)
}

GKStrategist wraps the ObjC protocol GKStrategist.

type GKTriangle

type GKTriangle struct {
	Points [3]unsafe.Pointer
}

type GKVoronoiNoiseSource

type GKVoronoiNoiseSource struct {
	GKNoiseSource
}

Voronoi noise partitions the space into angular, polygonal "cells", which are reminiscent of stained glass or crystal-like structures.

Apple documentation: https://developer.apple.com/documentation/gameplaykit/gkvoronoinoisesource

func GKVoronoiNoiseSourceFromID

func GKVoronoiNoiseSourceFromID(id objc.ID) *GKVoronoiNoiseSource

func GKVoronoiNoiseSourceVoronoiNoiseWithFrequencyDisplacementDistanceEnabledSeed

func GKVoronoiNoiseSourceVoronoiNoiseWithFrequencyDisplacementDistanceEnabledSeed(frequency float64, displacement float64, distanceEnabled bool, seed int32) *GKVoronoiNoiseSource

func (*GKVoronoiNoiseSource) Displacement

func (o *GKVoronoiNoiseSource) Displacement() float64

func (*GKVoronoiNoiseSource) Frequency

func (o *GKVoronoiNoiseSource) Frequency() float64

func (*GKVoronoiNoiseSource) InitWithFrequencyDisplacementDistanceEnabledSeed

func (o *GKVoronoiNoiseSource) InitWithFrequencyDisplacementDistanceEnabledSeed(frequency float64, displacement float64, distanceEnabled bool, seed int32) *GKVoronoiNoiseSource

func (*GKVoronoiNoiseSource) IsDistanceEnabled

func (o *GKVoronoiNoiseSource) IsDistanceEnabled() bool

func (*GKVoronoiNoiseSource) Seed

func (o *GKVoronoiNoiseSource) Seed() int32

func (*GKVoronoiNoiseSource) SetDisplacement

func (o *GKVoronoiNoiseSource) SetDisplacement(displacement float64)

func (*GKVoronoiNoiseSource) SetDistanceEnabled

func (o *GKVoronoiNoiseSource) SetDistanceEnabled(distanceEnabled bool)

func (*GKVoronoiNoiseSource) SetFrequency

func (o *GKVoronoiNoiseSource) SetFrequency(frequency float64)

func (*GKVoronoiNoiseSource) SetSeed

func (o *GKVoronoiNoiseSource) SetSeed(seed int32)

type Idtype_t

type Idtype_t int64
const (
	P_ALL  Idtype_t = 0
	P_PID  Idtype_t = 1
	P_PGID Idtype_t = 2
)

func (Idtype_t) String

func (e Idtype_t) String() string

type Ipc_info_object_type_t

type Ipc_info_object_type_t int64
const (
	IPC_OTYPE_NONE                 Ipc_info_object_type_t = 0
	IPC_OTYPE_THREAD_CONTROL       Ipc_info_object_type_t = 1
	IPC_OTYPE_TASK_CONTROL         Ipc_info_object_type_t = 2
	IPC_OTYPE_HOST                 Ipc_info_object_type_t = 3
	IPC_OTYPE_HOST_PRIV            Ipc_info_object_type_t = 4
	IPC_OTYPE_PROCESSOR            Ipc_info_object_type_t = 5
	IPC_OTYPE_PROCESSOR_SET        Ipc_info_object_type_t = 6
	IPC_OTYPE_PROCESSOR_SET_NAME   Ipc_info_object_type_t = 7
	IPC_OTYPE_TIMER                Ipc_info_object_type_t = 8
	IPC_OTYPE_PORT_SUBST_ONCE      Ipc_info_object_type_t = 9
	IPC_OTYPE_MIG                  Ipc_info_object_type_t = 10
	IPC_OTYPE_MEMORY_OBJECT        Ipc_info_object_type_t = 11
	IPC_OTYPE_XMM_PAGER            Ipc_info_object_type_t = 12
	IPC_OTYPE_XMM_KERNEL           Ipc_info_object_type_t = 13
	IPC_OTYPE_XMM_REPLY            Ipc_info_object_type_t = 14
	IPC_OTYPE_UND_REPLY            Ipc_info_object_type_t = 15
	IPC_OTYPE_HOST_NOTIFY          Ipc_info_object_type_t = 16
	IPC_OTYPE_HOST_SECURITY        Ipc_info_object_type_t = 17
	IPC_OTYPE_LEDGER               Ipc_info_object_type_t = 18
	IPC_OTYPE_MAIN_DEVICE          Ipc_info_object_type_t = 19
	IPC_OTYPE_TASK_NAME            Ipc_info_object_type_t = 20
	IPC_OTYPE_SUBSYSTEM            Ipc_info_object_type_t = 21
	IPC_OTYPE_IO_DONE_QUEUE        Ipc_info_object_type_t = 22
	IPC_OTYPE_SEMAPHORE            Ipc_info_object_type_t = 23
	IPC_OTYPE_LOCK_SET             Ipc_info_object_type_t = 24
	IPC_OTYPE_CLOCK                Ipc_info_object_type_t = 25
	IPC_OTYPE_CLOCK_CTRL           Ipc_info_object_type_t = 26
	IPC_OTYPE_IOKIT_IDENT          Ipc_info_object_type_t = 27
	IPC_OTYPE_NAMED_ENTRY          Ipc_info_object_type_t = 28
	IPC_OTYPE_IOKIT_CONNECT        Ipc_info_object_type_t = 29
	IPC_OTYPE_IOKIT_OBJECT         Ipc_info_object_type_t = 30
	IPC_OTYPE_UPL                  Ipc_info_object_type_t = 31
	IPC_OTYPE_MEM_OBJ_CONTROL      Ipc_info_object_type_t = 32
	IPC_OTYPE_AU_SESSIONPORT       Ipc_info_object_type_t = 33
	IPC_OTYPE_FILEPORT             Ipc_info_object_type_t = 34
	IPC_OTYPE_LABELH               Ipc_info_object_type_t = 35
	IPC_OTYPE_TASK_RESUME          Ipc_info_object_type_t = 36
	IPC_OTYPE_VOUCHER              Ipc_info_object_type_t = 37
	IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38
	IPC_OTYPE_WORK_INTERVAL        Ipc_info_object_type_t = 39
	IPC_OTYPE_UX_HANDLER           Ipc_info_object_type_t = 40
	IPC_OTYPE_UEXT_OBJECT          Ipc_info_object_type_t = 41
	IPC_OTYPE_ARCADE_REG           Ipc_info_object_type_t = 42
	IPC_OTYPE_EVENTLINK            Ipc_info_object_type_t = 43
	IPC_OTYPE_TASK_INSPECT         Ipc_info_object_type_t = 44
	IPC_OTYPE_TASK_READ            Ipc_info_object_type_t = 45
	IPC_OTYPE_THREAD_INSPECT       Ipc_info_object_type_t = 46
	IPC_OTYPE_THREAD_READ          Ipc_info_object_type_t = 47
	IPC_OTYPE_SUID_CRED            Ipc_info_object_type_t = 48
	IPC_OTYPE_HYPERVISOR           Ipc_info_object_type_t = 49
	IPC_OTYPE_TASK_ID_TOKEN        Ipc_info_object_type_t = 50
	IPC_OTYPE_TASK_FATAL           Ipc_info_object_type_t = 51
	IPC_OTYPE_KCDATA               Ipc_info_object_type_t = 52
	IPC_OTYPE_EXCLAVES_RESOURCE    Ipc_info_object_type_t = 53
	IPC_OTYPE_THREAD_RESUME        Ipc_info_object_type_t = 54
	IPC_OTYPE_UNKNOWN              Ipc_info_object_type_t = 4294967295
)

func (Ipc_info_object_type_t) String

func (e Ipc_info_object_type_t) String() string

type Launch_data_type_t

type Launch_data_type_t int64
const (
	LAUNCH_DATA_DICTIONARY Launch_data_type_t = 1
	LAUNCH_DATA_ARRAY      Launch_data_type_t = 2
	LAUNCH_DATA_FD         Launch_data_type_t = 3
	LAUNCH_DATA_INTEGER    Launch_data_type_t = 4
	LAUNCH_DATA_REAL       Launch_data_type_t = 5
	LAUNCH_DATA_BOOL       Launch_data_type_t = 6
	LAUNCH_DATA_STRING     Launch_data_type_t = 7
	LAUNCH_DATA_OPAQUE     Launch_data_type_t = 8
	LAUNCH_DATA_ERRNO      Launch_data_type_t = 9
	LAUNCH_DATA_MACHPORT   Launch_data_type_t = 10
)

func (Launch_data_type_t) String

func (e Launch_data_type_t) String() string

type MDLabelDomain

type MDLabelDomain int64

@typedef MDLabelDomain @abstract These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

type MDQueryOptionFlags

type MDQueryOptionFlags int64
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int64

@enum MDQuerySortOptionFlags @constant kMDQueryReverseSortOrderFlag Sort the attribute in reverse order.

const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

type Mach_vm_range_flags_t

type Mach_vm_range_flags_t int64
const (
	MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)

func (Mach_vm_range_flags_t) String

func (e Mach_vm_range_flags_t) String() string

type Mach_vm_range_flavor_t

type Mach_vm_range_flavor_t int64
const (
	MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0
	MACH_VM_RANGE_FLAVOR_V1      Mach_vm_range_flavor_t = 1
)

func (Mach_vm_range_flavor_t) String

func (e Mach_vm_range_flavor_t) String() string

type Mach_vm_range_tag_t

type Mach_vm_range_tag_t int64
const (
	MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0
	MACH_VM_RANGE_DATA    Mach_vm_range_tag_t = 1
	MACH_VM_RANGE_FIXED   Mach_vm_range_tag_t = 2
)

func (Mach_vm_range_tag_t) String

func (e Mach_vm_range_tag_t) String() string

type Mpo_flags_t

type Mpo_flags_t int64
const (
	MPO_PORT                            Mpo_flags_t = 0
	MPO_SERVICE_PORT                    Mpo_flags_t = 1024
	MPO_CONNECTION_PORT                 Mpo_flags_t = 2048
	MPO_REPLY_PORT                      Mpo_flags_t = 4096
	MPO_WEAK_REPLY_PORT                 Mpo_flags_t = 16384
	MPO_NOTIFICATION_PORT               Mpo_flags_t = 17408
	MPO_EXCEPTION_PORT                  Mpo_flags_t = 32768
	MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536
)

func (Mpo_flags_t) String

func (e Mpo_flags_t) String() string

type NXMouseButton

type NXMouseButton int64
const (
	NX_OneButton   NXMouseButton = 0
	NX_LeftButton  NXMouseButton = 1
	NX_RightButton NXMouseButton = 2
)

func (NXMouseButton) String

func (e NXMouseButton) String() string

type Os_clockid_t

type Os_clockid_t int64
const (
	OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)

func (Os_clockid_t) String

func (e Os_clockid_t) String() string

type Os_unfair_lock_flags_t

type Os_unfair_lock_flags_t int64
const (
	OS_UNFAIR_LOCK_FLAG_NONE          Os_unfair_lock_flags_t = 0
	OS_UNFAIR_LOCK_FLAG_ADAPTIVE_SPIN Os_unfair_lock_flags_t = 262144
)

func (Os_unfair_lock_flags_t) String

func (e Os_unfair_lock_flags_t) String() string

type PMPageToPaperMappingType

type PMPageToPaperMappingType int64
const (
	KPMPageToPaperMappingNone       PMPageToPaperMappingType = 1
	KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2
)

func (PMPageToPaperMappingType) String

func (e PMPageToPaperMappingType) String() string

type Ptrauth_key

type Ptrauth_key int64
const (
	Ptrauth_key_none                     Ptrauth_key = -1
	Ptrauth_key_asia                     Ptrauth_key = 0
	Ptrauth_key_asib                     Ptrauth_key = 1
	Ptrauth_key_asda                     Ptrauth_key = 2
	Ptrauth_key_asdb                     Ptrauth_key = 3
	Ptrauth_key_process_independent_code Ptrauth_key = 0
	Ptrauth_key_process_dependent_code   Ptrauth_key = 1
	Ptrauth_key_process_independent_data Ptrauth_key = 2
	Ptrauth_key_process_dependent_data   Ptrauth_key = 3
	Ptrauth_key_return_address           Ptrauth_key = 1
	Ptrauth_key_frame_pointer            Ptrauth_key = 3
	Ptrauth_key_function_pointer         Ptrauth_key = 0
	Ptrauth_key_block_function           Ptrauth_key = 0
	Ptrauth_key_cxx_vtable_pointer       Ptrauth_key = 2
	Ptrauth_key_method_list_pointer      Ptrauth_key = 2
	Ptrauth_key_objc_isa_pointer         Ptrauth_key = 2
	Ptrauth_key_objc_super_pointer       Ptrauth_key = 2
	Ptrauth_key_objc_sel_pointer         Ptrauth_key = 3
	Ptrauth_key_objc_class_ro_pointer    Ptrauth_key = 2
	Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2
	Ptrauth_key_init_fini_pointer        Ptrauth_key = 0
)

func (Ptrauth_key) String

func (e Ptrauth_key) String() string

type Qos_class_t

type Qos_class_t uint32
const (
	QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33
	QOS_CLASS_USER_INITIATED   Qos_class_t = 25
	QOS_CLASS_DEFAULT          Qos_class_t = 21
	QOS_CLASS_UTILITY          Qos_class_t = 17
	QOS_CLASS_BACKGROUND       Qos_class_t = 9
	QOS_CLASS_UNSPECIFIED      Qos_class_t = 0
)

func (Qos_class_t) String

func (e Qos_class_t) String() string

type Virtual_memory_guard_exception_code_t

type Virtual_memory_guard_exception_code_t int64
const (
	KGUARD_EXC_DEALLOC_GAP                   Virtual_memory_guard_exception_code_t = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        Virtual_memory_guard_exception_code_t = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         Virtual_memory_guard_exception_code_t = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    Virtual_memory_guard_exception_code_t = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    Virtual_memory_guard_exception_code_t = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         Virtual_memory_guard_exception_code_t = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         Virtual_memory_guard_exception_code_t = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  Virtual_memory_guard_exception_code_t = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    Virtual_memory_guard_exception_code_t = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              Virtual_memory_guard_exception_code_t = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        Virtual_memory_guard_exception_code_t = 99
	KGUARD_EXC_SEC_COPY_DENIED               Virtual_memory_guard_exception_code_t = 100
	KGUARD_EXC_SEC_SHARING_DENIED            Virtual_memory_guard_exception_code_t = 101
	KGUARD_EXC_MTE_SYNC_FAULT                Virtual_memory_guard_exception_code_t = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          Virtual_memory_guard_exception_code_t = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          Virtual_memory_guard_exception_code_t = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204
)

func (Virtual_memory_guard_exception_code_t) String

type Xpc_listener_create_flags_t

type Xpc_listener_create_flags_t int64
const (
	XPC_LISTENER_CREATE_NONE             Xpc_listener_create_flags_t = 0
	XPC_LISTENER_CREATE_INACTIVE         Xpc_listener_create_flags_t = 1
	XPC_LISTENER_CREATE_FORCE_MACH       Xpc_listener_create_flags_t = 2
	XPC_LISTENER_CREATE_FORCE_XPCSERVICE Xpc_listener_create_flags_t = 4
)

func (Xpc_listener_create_flags_t) String

type Xpc_session_create_flags_t

type Xpc_session_create_flags_t int64
const (
	XPC_SESSION_CREATE_NONE            Xpc_session_create_flags_t = 0
	XPC_SESSION_CREATE_INACTIVE        Xpc_session_create_flags_t = 1
	XPC_SESSION_CREATE_MACH_PRIVILEGED Xpc_session_create_flags_t = 2
)

func (Xpc_session_create_flags_t) String

Jump to

Keyboard shortcuts

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