Class GKObstacleGraph<_NodeType>

    • Constructor Detail

      • GKObstacleGraph

        protected GKObstacleGraph​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • graphWithObstaclesBufferRadius

        public static <_NodeType> GKObstacleGraph<?> graphWithObstaclesBufferRadius​(NSArray<? extends GKPolygonObstacle> obstacles,
                                                                                    float bufferRadius)
        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.
        Parameters:
        obstacles - a list of obstacles to create the graph from
        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
      • graphWithObstaclesBufferRadiusNodeClass

        public static <_NodeType> GKObstacleGraph<?> graphWithObstaclesBufferRadiusNodeClass​(NSArray<? extends GKPolygonObstacle> obstacles,
                                                                                             float bufferRadius,
                                                                                             org.moe.natj.objc.Class nodeClass)
        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.
        Parameters:
        obstacles - a list of obstacles to create the graph from
        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
        nodeClass - the class of the nodes that this graph should create. Must descend from GKGraphNode2D
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • addObstacles

        public void addObstacles​(NSArray<? extends GKPolygonObstacle> obstacles)
        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:]
        Parameters:
        obstacles - an array of obstacles to be added
        See Also:
        lockConnection
      • bufferRadius

        public float bufferRadius()
        The distance by which all obstacles are extruded. This is most commonly the spatial bounding radius of a potential traveler on this path
      • classForGenericArgumentAtIndex

        public org.moe.natj.objc.Class classForGenericArgumentAtIndex​(long index)
        Returns the class of the specified generic index
      • connectNodeUsingObstacles

        public void connectNodeUsingObstacles​(GKGraphNode2D node)
        Connects the node to this graph by testing edge intersection with existing obstacles. Same behavior as if this node had been present during initWithObstacles.
        Parameters:
        node - the node to connect
      • connectNodeUsingObstaclesIgnoringBufferRadiusOfObstacles

        public void connectNodeUsingObstaclesIgnoringBufferRadiusOfObstacles​(GKGraphNode2D node,
                                                                             NSArray<? extends GKPolygonObstacle> obstaclesBufferRadiusToIgnore)
        Same behavior as connectNodeUsingObstacles: except you can optionally ignore the bounding radius of certain obstacles from being tested for intersection
      • connectNodeUsingObstaclesIgnoringObstacles

        public void connectNodeUsingObstaclesIgnoringObstacles​(GKGraphNode2D node,
                                                               NSArray<? extends GKPolygonObstacle> obstaclesToIgnore)
        Same behavior as connectNodeUsingObstacles: except you can optionally ignore certain obstacles from being tested for intersection.
      • initWithObstaclesBufferRadiusNodeClass

        public GKObstacleGraph<?> initWithObstaclesBufferRadiusNodeClass​(NSArray<? extends GKPolygonObstacle> obstacles,
                                                                         float bufferRadius,
                                                                         org.moe.natj.objc.Class nodeClass)
      • isConnectionLockedFromNodeToNode

        public boolean isConnectionLockedFromNodeToNode​(GKGraphNode2D startNode,
                                                        GKGraphNode2D endNode)
        Query if a given connection is locked
        Parameters:
        startNode - startNode of the connection to query
        endNode - endNode of the connection to query
        Returns:
        YES if the connection was locked with lockConnection, NO if it was never locked or was unlocked via unlockConnection
        See Also:
        lockConnection, unlockConnection
      • lockConnectionFromNodeToNode

        public void lockConnectionFromNodeToNode​(GKGraphNode2D startNode,
                                                 GKGraphNode2D endNode)
        Marks a connection as "locked", preventing this connection from being destroyed when you add obstacles that would intersect it
        Parameters:
        startNode - startNode of the connection to lock
        endNode - endNode of the connection to lock
      • nodesForObstacle

        public NSArray<? extends GKGraphNode2D> nodesForObstacle​(GKPolygonObstacle obstacle)
        Returns an array of the graph nodes associated with a given obstacle
        Parameters:
        obstacle - the obstacle who's nodes are to be retrieved
      • obstacles

        public NSArray<? extends GKPolygonObstacle> obstacles()
        Array of the extruded obstacles currently represented by this graph
      • removeAllObstacles

        public void removeAllObstacles()
        Removes all obstacles from this graph.
      • removeObstacles

        public void removeObstacles​(NSArray<? extends GKPolygonObstacle> obstacles)
        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
        Parameters:
        obstacles - an array of obstacles to be removed
      • unlockConnectionFromNodeToNode

        public void unlockConnectionFromNodeToNode​(GKGraphNode2D startNode,
                                                   GKGraphNode2D endNode)
        "Unlocks" a connection, removing its protection from being destroyed when you add obstacles that would intersect it
        Parameters:
        startNode - startNode of the connection to unlock
        endNode - endNode of the connection to unlock
        See Also:
        lockConnection
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
        Overrides:
        _supportsSecureCoding in class GKGraph