Garry's Mod Wiki

CNavArea

An object returned by navmesh functions.

Methods

CNavArea:AddHidingSpot( Vector pos, number flags = 7 )
Adds a hiding spot onto this nav area. There's a limit of 255 hiding spots per area.
CNavArea:AddToClosedList()
Adds this CNavArea to the closed list, a list of areas that have been checked by A* pathfinding algorithm. Used in pathfinding via the A* algorithm. More information can be found on the Simple Pathfinding page.
CNavArea:AddToOpenList()
Adds this CNavArea to the Open List. Used in pathfinding via the A* algorithm. More information can be found on the Simple Pathfinding page.
CNavArea:ClearSearchLists()
Clears the open and closed lists for a new search. Used in pathfinding via the A* algorithm. More information can be found on the Simple Pathfinding page.
number CNavArea:ComputeAdjacentConnectionHeightChange( CNavArea navarea )
Returns the height difference between the edges of two connected navareas.
number CNavArea:ComputeDirection( Vector pos )
Returns the Enums/NavDir direction that the given vector faces on this CNavArea.
number CNavArea:ComputeGroundHeightChange( CNavArea navArea )
Returns the height difference on the Z axis of the two CNavAreas. This is calculated from the center most point on both CNavAreas.
CNavArea:ConnectTo( CNavArea area )
Connects this CNavArea to another CNavArea or CNavLadder with a one way connection. ( From this area to the target ) See CNavLadder:ConnectTo for making the connection from ladder to area.
boolean CNavArea:Contains( Vector pos )
Returns true if this CNavArea contains the given vector.
CNavArea:Disconnect( CNavArea area )
Disconnects this nav area from given area or ladder. (Only disconnects one way)
CNavArea:Draw()
Draws this navarea on debug overlay.
CNavArea:DrawSpots()
Draws the hiding spots on debug overlay. This includes sniper/exposed spots too!
table CNavArea:GetAdjacentAreas()
Returns a table of all the CNavAreas that have a ( one and two way ) connection from this CNavArea. If an area has a one-way incoming connection to this CNavArea, then it will not be returned from this function, use CNavArea:GetIncomingConnections to get all one-way incoming connections. See CNavArea:GetAdjacentAreasAtSide for a function that only returns areas from one side/direction.
table CNavArea:GetAdjacentAreasAtSide( number navDir )
Returns a table of all the CNavAreas that have a ( one and two way ) connection from this CNavArea in given direction. If an area has a one-way incoming connection to this CNavArea, then it will not be returned from this function, use CNavArea:GetIncomingConnections to get all incoming connections. See CNavArea:GetAdjacentAreas for a function that returns all areas from all sides/directions.
number CNavArea:GetAdjacentCount()
Returns the amount of CNavAreas that have a connection ( one and two way ) from this CNavArea. See CNavArea:GetAdjacentCountAtSide for a function that only returns area count from one side/direction.
number CNavArea:GetAdjacentCountAtSide( number navDir )
Returns the amount of CNavAreas that have a connection ( one or two way ) from this CNavArea in given direction. See CNavArea:GetAdjacentCount for a function that returns CNavArea count from/in all sides/directions.
boolean CNavArea:GetAttributes()
Returns the attribute mask for the given CNavArea.
Vector CNavArea:GetCenter()
Returns the center most vector point for the given CNavArea.
Vector CNavArea:GetClosestPointOnArea( Vector pos )
Returns the closest point of this Nav Area from the given position.
Vector CNavArea:GetCorner( number cornerid )
Returns the vector position of the corner for the given CNavArea.
number CNavArea:GetCostSoFar()
Returns the cost from starting area this area when pathfinding. Set by CNavArea:SetCostSoFar. Used in pathfinding via the A* algorithm. More information can be found on the Simple Pathfinding page.
table CNavArea:GetExposedSpots()
Returns a table of very bad hiding spots in this area. See also CNavArea:GetHidingSpots.
table CNavArea:GetExtentInfo()
Returns size info about the nav area.
table CNavArea:GetHidingSpots( number type = 1 )
Returns a table of good hiding spots in this area. See also CNavArea:GetExposedSpots.
number CNavArea:GetID()
Returns this CNavAreas unique ID.
table CNavArea:GetIncomingConnections()
Returns a table of all the CNavAreas that have a one-way connection to this CNavArea. If a CNavArea has a two-way connection to or from this CNavArea then it will not be returned from this function, use CNavArea:GetAdjacentAreas to get outgoing ( one and two way ) connections. See CNavArea:GetIncomingConnectionsAtSide for a function that returns one-way incoming connections from only one side/direction.
table CNavArea:GetIncomingConnectionsAtSide( number navDir )
Returns a table of all the CNavAreas that have a one-way connection to this CNavArea from given direction. If a CNavArea has a two-way connection to or from this CNavArea then it will not be returned from this function, use CNavArea:GetAdjacentAreas to get outgoing ( one and two way ) connections. See CNavArea:GetIncomingConnections for a function that returns one-way incoming connections from all sides/directions.
table CNavArea:GetLadders()
Returns all CNavLadders that have a ( one or two way ) connection from this CNavArea. See CNavArea:GetLaddersAtSide for a function that only returns CNavLadders in given direction.
table CNavArea:GetLaddersAtSide( number navDir )
Returns all CNavLadders that have a ( one or two way ) connection from ( one and two way ) this CNavArea in given direction. See CNavArea:GetLadders for a function that returns CNavLadder from/in all sides/directions.
CNavArea CNavArea:GetParent()
Returns the parent CNavArea
number CNavArea:GetParentHow()
Returns how this CNavArea is connected to its parent.
string CNavArea:GetPlace()
Returns the Place of the nav area.
CNavArea CNavArea:GetRandomAdjacentAreaAtSide( number navDir )
Returns a random CNavArea that has an outgoing ( one or two way ) connection from this CNavArea in given direction.
Vector CNavArea:GetRandomPoint()
Returns a random point on the nav area.
number CNavArea:GetSizeX()
Returns the width this Nav Area.
number CNavArea:GetSizeY()
Returns the height of this Nav Area.
number CNavArea:GetTotalCost()
Returns the total cost when passing from starting area to the goal area through this node. Set by CNavArea:SetTotalCost. Used in pathfinding via the A* algorithm. More information can be found on the Simple Pathfinding page.
number CNavArea:GetZ( Vector pos )
Returns the elevation of this Nav Area at the given position.
boolean CNavArea:HasAttributes( number attribs )
Returns true if the given CNavArea has this attribute flag set.
boolean CNavArea:IsBlocked( number teamID = -2, boolean ignoreNavBlockers = false )
Returns whether the nav area is blocked or not, i.e. whether it can be walked through or not.
boolean CNavArea:IsClosed()
Returns whether this node is in the Closed List. Used in pathfinding via the A* algorithm. More information can be found on the Simple Pathfinding page.
boolean CNavArea:IsCompletelyVisible( CNavArea area )
Returns whether this CNavArea can completely (i.e. all corners of this area can see all corners of the given area) see the given CNavArea.
boolean CNavArea:IsConnected( CNavArea navArea )
Returns whether this CNavArea has an outgoing ( one or two way ) connection to given CNavArea. See CNavArea:IsConnectedAtSide for a function that only checks for outgoing connections in one direction.
boolean CNavArea:IsConnectedAtSide( CNavArea navArea, number navDirType )
Returns whether this CNavArea has an outgoing ( one or two way ) connection to given CNavArea in given direction. See CNavArea:IsConnected for a function that checks all sides.
boolean CNavArea:IsCoplanar( CNavArea navArea )
Returns whether this Nav Area is in the same plane as the given one.
boolean CNavArea:IsFlat()
Returns whether this Nav Area is flat within the tolerance of the nav_coplanar_slope_limit_displacement and nav_coplanar_slope_limit convars.
boolean CNavArea:IsOpen()
Returns whether this area is in the Open List. Used in pathfinding via the A* algorithm. More information can be found on the Simple Pathfinding page.
boolean CNavArea:IsOpenListEmpty()
Returns whether the Open List is empty or not. Used in pathfinding via the A* algorithm. More information can be found on the Simple Pathfinding page.
boolean CNavArea:IsOverlapping( Vector pos, number tolerance = 0 )
Returns if this position overlaps the Nav Area within the given tolerance.
boolean CNavArea:IsOverlappingArea( CNavArea navArea )
Returns true if this CNavArea is overlapping the given CNavArea.
boolean CNavArea:IsPartiallyVisible( Vector pos, Entity ignoreEnt = NULL )
Returns whether this CNavArea can see given position.
boolean CNavArea:IsPotentiallyVisible( CNavArea area )
Returns whether this CNavArea can potentially see the given CNavArea.
boolean CNavArea:IsRoughlySquare()
Returns if we're shaped like a square.
boolean CNavArea:IsUnderwater()
Whether this Nav Area is placed underwater.
boolean CNavArea:IsValid()
Returns whether this CNavArea is valid or not.
boolean, Vector CNavArea:IsVisible( Vector pos )
Returns whether we can be seen from the given position.
CNavArea:PlaceOnGround( number corner )
Drops a corner or all corners of a CNavArea to the ground below it.
CNavArea CNavArea:PopOpenList()
Removes a CNavArea from the Open List with the lowest cost to traverse to from the starting node, and returns it. Used in pathfinding via the A* algorithm. More information can be found on the Simple Pathfinding page.
CNavArea:Remove()
Removes the given nav area.
CNavArea:RemoveFromClosedList()
Removes this node from the Closed List. Used in pathfinding via the A* algorithm. More information can be found on the Simple Pathfinding page.
CNavArea:SetAttributes( number attribs )
Sets the attributes for given CNavArea.
CNavArea:SetCorner( number corner, Vector position )
Sets the position of a corner of a nav area.
CNavArea:SetCostSoFar( number cost )
Sets the cost from starting area this area when pathfinding. Used in pathfinding via the A* algorithm. More information can be found on the Simple Pathfinding page.
CNavArea:SetParent( CNavArea parent )
Sets the new parent of this CNavArea.
boolean CNavArea:SetPlace( string place )
Sets the Place of the nav area. There is a limit of 256 Places per nav file.
CNavArea:SetTotalCost( number cost )
Sets the total cost when passing from starting area to the goal area through this node. Used in pathfinding via the A* algorithm. More information can be found on the Simple Pathfinding page.
CNavArea:UpdateOnOpenList()
Moves this open list to appropriate position based on its CNavArea:GetTotalCost compared to the total cost of other areas in the open list. Used in pathfinding via the A* algorithm. More information can be found on the Simple Pathfinding page.

Page Links


Special Pages


Wikis

?

Render Time: 59ms

DB GetPage 6
Generate Html 3
SaveChanges (1) 30
Render Body 0
Render Sidebar 16