2013-09-18 17:55:16 +00:00
|
|
|
/*
|
|
|
|
* KiRouter - a push-and-(sometimes-)shove PCB router
|
|
|
|
*
|
2014-05-14 13:53:54 +00:00
|
|
|
* Copyright (C) 2013-2014 CERN
|
2013-09-18 17:55:16 +00:00
|
|
|
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
2013-09-26 21:53:54 +00:00
|
|
|
*
|
2013-09-18 17:55:16 +00:00
|
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or (at your
|
|
|
|
* option) any later version.
|
2013-09-26 21:53:54 +00:00
|
|
|
*
|
2013-09-18 17:55:16 +00:00
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
2013-09-26 21:53:54 +00:00
|
|
|
*
|
2013-09-18 17:55:16 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
2014-05-14 13:53:54 +00:00
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
2013-09-18 17:55:16 +00:00
|
|
|
*/
|
2014-05-14 13:53:54 +00:00
|
|
|
|
2013-09-18 17:55:16 +00:00
|
|
|
#ifndef __PNS_NODE_H
|
|
|
|
#define __PNS_NODE_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <list>
|
|
|
|
|
|
|
|
#include <boost/unordered_set.hpp>
|
|
|
|
#include <boost/unordered_map.hpp>
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
|
|
|
|
#include <geometry/shape.h>
|
|
|
|
#include <geometry/shape_line_chain.h>
|
|
|
|
#include <geometry/shape_index.h>
|
|
|
|
|
|
|
|
#include "pns_item.h"
|
|
|
|
#include "pns_joint.h"
|
|
|
|
#include "pns_itemset.h"
|
|
|
|
|
|
|
|
class PNS_SEGMENT;
|
|
|
|
class PNS_LINE;
|
|
|
|
class PNS_SOLID;
|
|
|
|
class PNS_VIA;
|
|
|
|
class PNS_RATSNEST;
|
|
|
|
class PNS_INDEX;
|
|
|
|
|
|
|
|
|
2014-05-14 13:53:54 +00:00
|
|
|
/**
|
|
|
|
* Class PNS_CLEARANCE_FUNC
|
|
|
|
*
|
|
|
|
* An abstract function object, returning a required clearance between two items.
|
|
|
|
**/
|
2013-09-26 21:53:54 +00:00
|
|
|
class PNS_CLEARANCE_FUNC
|
|
|
|
{
|
|
|
|
public:
|
2014-05-16 11:37:31 +00:00
|
|
|
virtual int operator()( const PNS_ITEM* aA, const PNS_ITEM* aB ) = 0;
|
2013-11-01 12:56:20 +00:00
|
|
|
virtual ~PNS_CLEARANCE_FUNC() {}
|
2013-09-18 17:55:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Struct PNS_OBSTACLE
|
|
|
|
*
|
|
|
|
* Holds an object colliding with another object, along with
|
|
|
|
* some useful data about the collision.
|
|
|
|
**/
|
2013-09-26 21:53:54 +00:00
|
|
|
struct PNS_OBSTACLE
|
2013-09-18 17:55:16 +00:00
|
|
|
{
|
2013-09-26 21:53:54 +00:00
|
|
|
///> Item we search collisions with
|
2014-05-16 11:37:31 +00:00
|
|
|
PNS_ITEM* m_head;
|
2013-09-26 21:53:54 +00:00
|
|
|
|
2014-05-16 11:37:31 +00:00
|
|
|
///> Item found to be colliding with m_head
|
|
|
|
PNS_ITEM* m_item;
|
2013-09-26 21:53:54 +00:00
|
|
|
|
2014-05-16 11:37:31 +00:00
|
|
|
///> Hull of the colliding m_item
|
|
|
|
SHAPE_LINE_CHAIN m_hull;
|
2013-09-26 21:53:54 +00:00
|
|
|
|
|
|
|
///> First and last intersection point between the head item and the hull
|
2014-05-16 11:37:31 +00:00
|
|
|
///> of the colliding m_item
|
|
|
|
VECTOR2I m_ipFirst, m_ipLast;
|
2013-09-26 21:53:54 +00:00
|
|
|
|
|
|
|
///> ... and the distance thereof
|
2014-05-16 11:37:31 +00:00
|
|
|
int m_distFirst, m_distLast;
|
2013-09-18 17:55:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class PNS_NODE
|
|
|
|
*
|
2013-10-14 11:43:57 +00:00
|
|
|
* Keeps the router "world" - i.e. all the tracks, vias, solids in a
|
2013-09-26 21:53:54 +00:00
|
|
|
* hierarchical and indexed way.
|
2013-09-18 17:55:16 +00:00
|
|
|
* Features:
|
|
|
|
* - spatial-indexed container for PCB item shapes
|
2014-05-14 13:53:54 +00:00
|
|
|
* - collision search & clearance checking
|
2013-09-18 17:55:16 +00:00
|
|
|
* - assembly of lines connecting joints, finding loops and unique paths
|
2013-10-14 11:43:57 +00:00
|
|
|
* - lightweight cloning/branching (for recursive optimization and shove
|
2013-09-26 21:53:54 +00:00
|
|
|
* springback)
|
2013-09-18 17:55:16 +00:00
|
|
|
**/
|
2013-09-26 21:53:54 +00:00
|
|
|
class PNS_NODE
|
|
|
|
{
|
2013-09-18 17:55:16 +00:00
|
|
|
public:
|
2014-05-16 11:37:31 +00:00
|
|
|
typedef boost::optional<PNS_OBSTACLE> OPT_OBSTACLE;
|
|
|
|
typedef std::vector<PNS_ITEM*> ITEM_VECTOR;
|
|
|
|
typedef std::vector<PNS_OBSTACLE> OBSTACLES;
|
2014-05-14 13:53:54 +00:00
|
|
|
|
|
|
|
PNS_NODE ();
|
|
|
|
~PNS_NODE ();
|
2013-09-18 17:55:16 +00:00
|
|
|
|
2013-09-26 21:53:54 +00:00
|
|
|
///> Returns the expected clearance between items a and b.
|
2014-05-16 11:37:31 +00:00
|
|
|
int GetClearance( const PNS_ITEM* aA, const PNS_ITEM* aB ) const;
|
2013-09-18 17:55:16 +00:00
|
|
|
|
2013-09-26 21:53:54 +00:00
|
|
|
///> Returns the pre-set worst case clearance between any pair of items
|
2014-05-16 11:37:31 +00:00
|
|
|
int GetMaxClearance() const
|
2013-09-26 21:53:54 +00:00
|
|
|
{
|
|
|
|
return m_maxClearance;
|
|
|
|
}
|
2013-09-18 17:55:16 +00:00
|
|
|
|
2014-05-14 13:53:54 +00:00
|
|
|
///> Sets the worst-case clerance between any pair of items
|
2014-05-16 11:37:31 +00:00
|
|
|
void SetMaxClearance( int aClearance )
|
2013-09-26 21:53:54 +00:00
|
|
|
{
|
|
|
|
m_maxClearance = aClearance;
|
|
|
|
}
|
2013-09-18 17:55:16 +00:00
|
|
|
|
2014-05-14 13:53:54 +00:00
|
|
|
///> Assigns a clerance resolution function object
|
2014-05-16 11:37:31 +00:00
|
|
|
void SetClearanceFunctor( PNS_CLEARANCE_FUNC* aFunc )
|
2013-09-26 21:53:54 +00:00
|
|
|
{
|
|
|
|
m_clearanceFunctor = aFunc;
|
|
|
|
}
|
2013-09-18 17:55:16 +00:00
|
|
|
|
2013-09-26 21:53:54 +00:00
|
|
|
///> Returns the number of joints
|
|
|
|
int JointCount() const
|
|
|
|
{
|
|
|
|
return m_joints.size();
|
|
|
|
}
|
2013-09-18 17:55:16 +00:00
|
|
|
|
2014-05-14 13:53:54 +00:00
|
|
|
///> Returns the number of nodes in the inheritance chain (wrs to the root node)
|
|
|
|
int Depth() const
|
|
|
|
{
|
|
|
|
return m_depth;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function QueryColliding()
|
|
|
|
*
|
|
|
|
* Finds items collliding (closer than clearance) with the item aItem.
|
|
|
|
* @param aItem item to check collisions against
|
|
|
|
* @param aObstacles set of colliding objects found
|
|
|
|
* @param aKindMask mask of obstacle types to take into account
|
|
|
|
* @param aLimitCount stop looking for collisions after finding this number of colliding items
|
|
|
|
* @return number of obstacles found
|
|
|
|
*/
|
2014-05-16 11:37:31 +00:00
|
|
|
int QueryColliding( const PNS_ITEM* aItem,
|
|
|
|
OBSTACLES& aObstacles,
|
|
|
|
int aKindMask = PNS_ITEM::ANY,
|
|
|
|
int aLimitCount = -1 );
|
2014-05-14 13:53:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function NearestObstacle()
|
|
|
|
*
|
|
|
|
* Follows the line in search of an obstacle that is nearest to the starting to the line's starting
|
|
|
|
* point.
|
|
|
|
* @param aItem the item to find collisions with
|
|
|
|
* @param aKindMask mask of obstacle types to take into account
|
|
|
|
* @return the obstacle, if found, otherwise empty.
|
|
|
|
*/
|
2014-05-16 11:37:31 +00:00
|
|
|
OPT_OBSTACLE NearestObstacle( const PNS_LINE* aItem,
|
2014-05-14 13:53:54 +00:00
|
|
|
int aKindMask = PNS_ITEM::ANY );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function CheckColliding()
|
|
|
|
*
|
|
|
|
* Checks if the item collides with anything else in the world,
|
|
|
|
* and if found, returns the obstacle.
|
|
|
|
* @param aItem the item to find collisions with
|
|
|
|
* @param aKindMask mask of obstacle types to take into account
|
|
|
|
* @return the obstacle, if found, otherwise empty.
|
|
|
|
*/
|
2014-05-16 11:37:31 +00:00
|
|
|
OPT_OBSTACLE CheckColliding( const PNS_ITEM* aItem,
|
2014-05-14 13:53:54 +00:00
|
|
|
int aKindMask = PNS_ITEM::ANY );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function CheckColliding()
|
|
|
|
*
|
|
|
|
* Checks if any item in the set collides with anything else in the world,
|
|
|
|
* and if found, returns the obstacle.
|
|
|
|
* @param aSet set of items to find collisions with
|
|
|
|
* @param aKindMask mask of obstacle types to take into account
|
|
|
|
* @return the obstacle, if found, otherwise empty.
|
|
|
|
*/
|
2014-05-16 11:37:31 +00:00
|
|
|
OPT_OBSTACLE CheckColliding( const PNS_ITEMSET& aSet,
|
2014-05-14 13:53:54 +00:00
|
|
|
int aKindMask = PNS_ITEM::ANY );
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function CheckColliding()
|
|
|
|
*
|
|
|
|
* Checks if any item in the set collides with anything else in the world,
|
|
|
|
* and if found, returns the obstacle.
|
|
|
|
* @param aSet set of items to find collisions with
|
|
|
|
* @param aKindMask mask of obstacle types to take into account
|
|
|
|
* @return the obstacle, if found, otherwise empty.
|
|
|
|
*/
|
2014-05-16 11:37:31 +00:00
|
|
|
bool CheckColliding( const PNS_ITEM* aItemA,
|
|
|
|
const PNS_ITEM* aItemB,
|
|
|
|
int aKindMask = PNS_ITEM::ANY );
|
2014-05-14 13:53:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function HitTest()
|
|
|
|
*
|
|
|
|
* Finds all items that contain the point aPoint.
|
|
|
|
* @param aPoint the point
|
|
|
|
* @return the items
|
|
|
|
*/
|
2014-05-16 11:37:31 +00:00
|
|
|
const PNS_ITEMSET HitTest( const VECTOR2I& aPoint ) const;
|
2014-05-14 13:53:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function Add()
|
|
|
|
*
|
|
|
|
* Adds an item to the current node.
|
|
|
|
* @param aItem item to add
|
|
|
|
* @param aAllowRedundant if true, duplicate items are allowed (e.g. a segment or via
|
|
|
|
* at the same coordinates as an existing one)
|
|
|
|
*/
|
2014-05-16 11:37:31 +00:00
|
|
|
void Add( PNS_ITEM* aItem, bool aAllowRedundant = false );
|
2014-05-14 13:53:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function Remove()
|
|
|
|
*
|
|
|
|
* Just as the name says, removes an item from this branch.
|
|
|
|
* @param aItem item to remove
|
|
|
|
*/
|
2014-05-16 11:37:31 +00:00
|
|
|
void Remove( PNS_ITEM* aItem );
|
2014-05-14 13:53:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function Replace()
|
|
|
|
*
|
|
|
|
* Just as the name says, replaces an item with another one.
|
|
|
|
* @param aOldItem item to be removed
|
|
|
|
* @param aNewItem item add instead
|
|
|
|
*/
|
2014-05-16 11:37:31 +00:00
|
|
|
void Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem );
|
2014-05-14 13:53:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function Branch()
|
|
|
|
*
|
|
|
|
* Creates a lightweight copy (called branch) of self that tracks
|
|
|
|
* the changes (added/removed items) wrs to the root. Note that if there are
|
|
|
|
* any branches in use, their parents must NOT be deleted.
|
|
|
|
* @return the new branch
|
|
|
|
*/
|
2014-05-16 11:37:31 +00:00
|
|
|
PNS_NODE* Branch();
|
2014-05-14 13:53:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function AssembleLine()
|
|
|
|
*
|
|
|
|
* Follows the joint map to assemble a line connecting two non-trivial
|
|
|
|
* joints starting from segment aSeg.
|
|
|
|
* @param aSeg the initial segment
|
|
|
|
* @param aOriginSegmentIndex index of aSeg in the resulting line
|
|
|
|
* @return the line
|
|
|
|
*/
|
2014-05-16 11:37:31 +00:00
|
|
|
PNS_LINE* AssembleLine( PNS_SEGMENT* aSeg, int *aOriginSegmentIndex = NULL );
|
2014-05-14 13:53:54 +00:00
|
|
|
|
|
|
|
///> Prints the contents and joints structure
|
2014-05-16 11:37:31 +00:00
|
|
|
void Dump( bool aLong = false );
|
2014-05-14 13:53:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function GetUpdatedItems()
|
|
|
|
*
|
|
|
|
* Returns the lists of items removed and added in this branch, with
|
|
|
|
* respect to the root branch.
|
|
|
|
* @param aRemoved removed items
|
|
|
|
* @param aAdded added items
|
|
|
|
*/
|
2014-05-16 11:37:31 +00:00
|
|
|
void GetUpdatedItems( ITEM_VECTOR& aRemoved, ITEM_VECTOR& aAdded );
|
2014-05-14 13:53:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function Commit()
|
|
|
|
*
|
|
|
|
* Applies the changes from a given branch (aNode) to the root branch. Called on
|
|
|
|
* a non-root branch will fail. Calling commit also kills all children nodes of the root branch.
|
|
|
|
* @param aNode node to commit changes from
|
|
|
|
*/
|
2013-09-26 21:53:54 +00:00
|
|
|
void Commit( PNS_NODE* aNode );
|
2013-09-18 17:55:16 +00:00
|
|
|
|
2014-05-14 13:53:54 +00:00
|
|
|
/**
|
|
|
|
* Function FindJoint()
|
|
|
|
*
|
|
|
|
* Searches for a joint at a given position, layer and belonging to given net.
|
|
|
|
* @return the joint, if found, otherwise empty
|
|
|
|
*/
|
|
|
|
PNS_JOINT* FindJoint( const VECTOR2I& aPos, int aLayer, int aNet );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function FindJoint()
|
|
|
|
*
|
|
|
|
* Searches for a joint at a given position, linked to given item.
|
|
|
|
* @return the joint, if found, otherwise empty
|
|
|
|
*/
|
2014-05-16 11:37:31 +00:00
|
|
|
PNS_JOINT* FindJoint( const VECTOR2I& aPos, PNS_ITEM* aItem )
|
2014-05-14 13:53:54 +00:00
|
|
|
{
|
|
|
|
return FindJoint( aPos, aItem->Layers().Start(), aItem->Net() );
|
|
|
|
}
|
2013-09-18 17:55:16 +00:00
|
|
|
|
2014-05-16 11:37:31 +00:00
|
|
|
void MapConnectivity( PNS_JOINT* aStart, std::vector<PNS_JOINT*> & aFoundJoints );
|
2013-09-18 17:55:16 +00:00
|
|
|
|
2014-05-16 11:37:31 +00:00
|
|
|
PNS_ITEM* NearestUnconnectedItem( PNS_JOINT* aStart, int *aAnchor = NULL,
|
|
|
|
int aKindMask = PNS_ITEM::ANY);
|
2013-09-18 17:55:16 +00:00
|
|
|
|
|
|
|
|
2014-05-14 13:53:54 +00:00
|
|
|
///> finds all lines between a pair of joints. Used by the loop removal procedure.
|
2014-05-16 11:37:31 +00:00
|
|
|
int FindLinesBetweenJoints( PNS_JOINT& aA,
|
|
|
|
PNS_JOINT& aB,
|
2014-05-14 13:53:54 +00:00
|
|
|
std::vector<PNS_LINE*>& aLines );
|
|
|
|
|
|
|
|
///> finds the joints corresponding to the ends of line aLine
|
2014-05-16 11:37:31 +00:00
|
|
|
void FindLineEnds( PNS_LINE* aLine, PNS_JOINT& aA, PNS_JOINT& aB );
|
2014-05-14 13:53:54 +00:00
|
|
|
|
2013-09-26 21:53:54 +00:00
|
|
|
///> Destroys all child nodes. Applicable only to the root node.
|
|
|
|
void KillChildren();
|
|
|
|
|
2014-05-14 13:53:54 +00:00
|
|
|
void AllItemsInNet( int aNet, std::set<PNS_ITEM*>& aItems );
|
|
|
|
|
|
|
|
void ClearRanks();
|
|
|
|
|
2014-05-16 11:37:31 +00:00
|
|
|
int FindByMarker( int aMarker, PNS_ITEMSET& aItems );
|
|
|
|
int RemoveByMarker( int aMarker );
|
2013-09-18 17:55:16 +00:00
|
|
|
|
2013-09-26 21:53:54 +00:00
|
|
|
private:
|
2014-05-16 11:37:31 +00:00
|
|
|
struct OBSTACLE_VISITOR;
|
|
|
|
typedef boost::unordered_multimap<PNS_JOINT::HASH_TAG, PNS_JOINT> JOINT_MAP;
|
|
|
|
typedef JOINT_MAP::value_type TagJointPair;
|
2013-09-26 21:53:54 +00:00
|
|
|
|
|
|
|
/// nodes are not copyable
|
2014-05-16 11:37:31 +00:00
|
|
|
PNS_NODE( const PNS_NODE& aB );
|
|
|
|
PNS_NODE& operator=( const PNS_NODE& aB );
|
2013-09-26 21:53:54 +00:00
|
|
|
|
|
|
|
///> tries to find matching joint and creates a new one if not found
|
2014-05-14 13:53:54 +00:00
|
|
|
PNS_JOINT& touchJoint( const VECTOR2I& aPos,
|
|
|
|
const PNS_LAYERSET& aLayers,
|
|
|
|
int aNet );
|
2013-09-26 21:53:54 +00:00
|
|
|
|
2014-05-16 11:37:31 +00:00
|
|
|
///> touches a joint and links it to an m_item
|
2013-10-14 11:43:57 +00:00
|
|
|
void linkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers,
|
2014-05-16 11:37:31 +00:00
|
|
|
int aNet, PNS_ITEM* aWhere );
|
2013-09-26 21:53:54 +00:00
|
|
|
|
|
|
|
///> unlinks an item from a joint
|
2013-10-14 11:43:57 +00:00
|
|
|
void unlinkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers,
|
2013-09-26 21:53:54 +00:00
|
|
|
int aNet, PNS_ITEM* aWhere );
|
|
|
|
|
|
|
|
///> helpers for adding/removing items
|
|
|
|
void addSolid( PNS_SOLID* aSeg );
|
2014-05-14 13:53:54 +00:00
|
|
|
void addSegment( PNS_SEGMENT* aSeg, bool aAllowRedundant );
|
|
|
|
void addLine( PNS_LINE* aLine, bool aAllowRedundant );
|
2013-09-26 21:53:54 +00:00
|
|
|
void addVia( PNS_VIA* aVia );
|
|
|
|
void removeSolid( PNS_SOLID* aSeg );
|
|
|
|
void removeLine( PNS_LINE* aLine );
|
|
|
|
void removeSegment( PNS_SEGMENT* aSeg );
|
|
|
|
void removeVia( PNS_VIA* aVia );
|
|
|
|
|
|
|
|
void doRemove( PNS_ITEM* aItem );
|
|
|
|
void unlinkParent();
|
|
|
|
void releaseChildren();
|
|
|
|
|
|
|
|
bool isRoot() const
|
|
|
|
{
|
|
|
|
return m_parent == NULL;
|
|
|
|
}
|
|
|
|
|
2014-05-16 11:37:31 +00:00
|
|
|
///> checks if this branch contains an updated version of the m_item
|
2013-09-26 21:53:54 +00:00
|
|
|
///> from the root branch.
|
|
|
|
bool overrides( PNS_ITEM* aItem ) const
|
|
|
|
{
|
|
|
|
return m_override.find( aItem ) != m_override.end();
|
|
|
|
}
|
|
|
|
|
2014-05-16 11:37:31 +00:00
|
|
|
PNS_SEGMENT *findRedundantSegment ( PNS_SEGMENT* aSeg );
|
2013-09-26 21:53:54 +00:00
|
|
|
|
2014-05-14 13:53:54 +00:00
|
|
|
///> scans the joint map, forming a line starting from segment (current).
|
2014-05-16 11:37:31 +00:00
|
|
|
void followLine( PNS_SEGMENT* aCurrent,
|
|
|
|
bool aScanDirection,
|
|
|
|
int& aPos,
|
|
|
|
int aLimit,
|
|
|
|
VECTOR2I* aCorners,
|
2014-05-23 09:57:43 +00:00
|
|
|
PNS_SEGMENT** aSegments,
|
|
|
|
bool& aGuardHit );
|
2013-09-26 21:53:54 +00:00
|
|
|
|
2013-10-14 11:43:57 +00:00
|
|
|
///> hash table with the joints, linking the items. Joints are hashed by
|
2013-09-26 21:53:54 +00:00
|
|
|
///> their position, layer set and net.
|
2014-05-16 11:37:31 +00:00
|
|
|
JOINT_MAP m_joints;
|
2013-09-26 21:53:54 +00:00
|
|
|
|
|
|
|
///> node this node was branched from
|
|
|
|
PNS_NODE* m_parent;
|
|
|
|
|
|
|
|
///> root node of the whole hierarchy
|
|
|
|
PNS_NODE* m_root;
|
|
|
|
|
|
|
|
///> list of nodes branched from this one
|
|
|
|
std::vector<PNS_NODE*> m_children;
|
|
|
|
|
2014-05-14 13:53:54 +00:00
|
|
|
///> hash of root's items that have been changed in this node
|
2013-09-26 21:53:54 +00:00
|
|
|
boost::unordered_set<PNS_ITEM*> m_override;
|
|
|
|
|
|
|
|
///> worst case item-item clearance
|
|
|
|
int m_maxClearance;
|
|
|
|
|
|
|
|
///> Clearance resolution functor
|
|
|
|
PNS_CLEARANCE_FUNC* m_clearanceFunctor;
|
|
|
|
|
|
|
|
///> Geometric/Net index of the items
|
|
|
|
PNS_INDEX* m_index;
|
|
|
|
|
2014-05-14 13:53:54 +00:00
|
|
|
///> depth of the node (number of parent nodes in the inheritance chain)
|
|
|
|
int m_depth;
|
2013-09-18 17:55:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|