iso::space::NeighborGroup Class Reference

#include <iso_space_neighbor_group.h>

Collaboration diagram for iso::space::NeighborGroup:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 NeighborGroup (SpaceObject *pSpaceObject, Space *pSpace, bool pVisible)
 create neighbor collection
 NeighborGroup (SpaceObject *pSpaceObject, Space *pSpace, bool pVisible, NeighborGroupAlg *pNeighborGroupAlg)
 create neighbor collection
virtual ~NeighborGroup ()
 destructor
SpaceObjectspaceObject ()
 return space object this neighborlist is associated with
const SpaceObjectspaceObject () const
 return space object this neighborlist is associated with
const base::String & name () const
 return space name
Spacespace ()
 return space this neighborlist is based on
bool visible () const
 check whether the space object is visible or not
void setVisible (bool pVisible)
 set space object visibility
bool canHaveNeighbors () const
 check whether this neighbor group can have neighbors
NeighborGroupAlgneighborGroupAlg ()
 return neighborhood algorithm
void setNeighborGroupAlg (NeighborGroupAlg *pNeighborGroupAlg)
 set neigbhorhood algorithm
real neighborRadius () const
 return neighbor radius
unsigned int neighborCount () const
 return number of neighbors
unsigned int maxNeighborCount () const
 return maximum number of neighbors
bool replaceNeighborMode () const
bool full () const
 returns true if no more neighbors can be added to neighbor list
void setNeighborRadius (real pNeighborRadius)
 set neighbor radius
SpaceObjectneighbor (unsigned int pIndex)
 return neighboring space object
const SpaceObjectneighbor (unsigned int pIndex) const
 return neighboring space object
const math::Vector< real > & value (unsigned int pIndex) const
 return value of neighbor relation
const math::Vector< real > & direction (unsigned int pIndex) const
 return direction of neighbor relation
real distance (unsigned int pIndex) const
 return distance of neighbor relation
QVector< SpaceNeighborRelation * > & neighborRelations ()
 return neighbor relations
SpaceNeighborRelationneighborRelation (unsigned int pIndex)
 return neighbor relation
const SpaceNeighborRelationneighborRelation (unsigned int pIndex) const
 return neighbor relation
SpaceNeighborRelationoperator[] (unsigned int pIndex)
 return neighbor relation
bool addNeighbor (SpaceObject *pNeighborObject)
 add neighbor object to neighbor list
bool addNeighbor (SpaceObject *pNeighborObject, real pDistance, const math::Vector< real > &pDirection)
 add neighbor object to neighbor list
void removeNeighbor (SpaceObject *pNeighborObject)
 remove neighbor
void removeNeighbor (unsigned int pNeighborIndex)
 remove neighbor
void removeNeighbors ()
 remove neighbors
virtual base::String info (int pPropagationLevel=0) const
 print neighbor collection information

Static Public Attributes

static const base::String sClassName
 class name

Protected Member Functions

 NeighborGroup ()
 default constructor

Protected Attributes

SpaceObjectmSpaceObject
 space object
SpacemSpace
 space this neighborlist is based on
bool mVisible
 visibility of space object in this space
NeighborGroupAlgmNeighborGroupAlg
 neighborhood algorithm
QVector< SpaceNeighborRelation * > mNeighborRelations
 list of neighbor relations

Friends

class SpaceProxyObject
class NeighborGroupAlg
std::ostream & operator<< (std::ostream &pOstream, const NeighborGroup &pNeighborGroup)
 retrieve textual neighbor group info

Constructor & Destructor Documentation

NeighborGroup::NeighborGroup ( SpaceObject pSpaceObject,
Space pSpace,
bool  pVisible 
)

create neighbor collection

Parameters:
pSpaceObject space object this neighborlist is part of
pSpace space this neighborgroup is based on
pVisible visiblity of space object

NeighborGroup::NeighborGroup ( SpaceObject pSpaceObject,
Space pSpace,
bool  pVisible,
NeighborGroupAlg pNeighborGroupAlg 
)

create neighbor collection

Parameters:
pSpaceObject space object this neighbor list is part of
pSpace space this neighborgroup is based on
pVisible visiblity of space object
pNeighborGroupAlg neighbor group algorithm

NeighborGroup::~NeighborGroup (  )  [virtual]

destructor

NeighborGroup::NeighborGroup (  )  [protected]

default constructor


Member Function Documentation

SpaceObject * NeighborGroup::spaceObject (  ) 

return space object this neighborlist is associated with

Returns:
space object

const SpaceObject * NeighborGroup::spaceObject (  )  const

return space object this neighborlist is associated with

Returns:
space object

const base::String & NeighborGroup::name (  )  const

return space name

Returns:
space name

Space * NeighborGroup::space (  ) 

return space this neighborlist is based on

Returns:
space

bool NeighborGroup::visible (  )  const

check whether the space object is visible or not

Returns:
true: object is visible, false: otherwise
a visible object can be a neighbor for another object in the same space, an invisible can't

void NeighborGroup::setVisible ( bool  pVisible  ) 

set space object visibility

Parameters:
pVisible object visibility

bool NeighborGroup::canHaveNeighbors (  )  const

check whether this neighbor group can have neighbors

Returns:
true: neighbor group can have neighbors, false: object can't have neighbors

NeighborGroupAlg * NeighborGroup::neighborGroupAlg (  ) 

return neighborhood algorithm

Returns:
neighborhood algorithm

void NeighborGroup::setNeighborGroupAlg ( NeighborGroupAlg pNeighborGroupAlg  ) 

set neigbhorhood algorithm

Parameters:
pNeighborGroupAlg neighborhood algorithm

space::real NeighborGroup::neighborRadius (  )  const

return neighbor radius

Returns:
neighbor radius
Remarks:
fails if object can't have neighbors

unsigned int NeighborGroup::neighborCount (  )  const

return number of neighbors

Returns:
number of neighbors

unsigned int NeighborGroup::maxNeighborCount (  )  const

return maximum number of neighbors

Returns:
maximum number of neighbors

bool NeighborGroup::replaceNeighborMode (  )  const

bool NeighborGroup::full (  )  const

returns true if no more neighbors can be added to neighbor list

void NeighborGroup::setNeighborRadius ( real  pNeighborRadius  ) 

set neighbor radius

Parameters:
pNeighborRadius neighbor radius
Remarks:
fails if object can't have neighbors

SpaceObject * NeighborGroup::neighbor ( unsigned int  pIndex  ) 

return neighboring space object

Parameters:
pIndex neighbor index
Returns:
neighboring space object
Remarks:
fails if index is out of bounds

const SpaceObject * NeighborGroup::neighbor ( unsigned int  pIndex  )  const

return neighboring space object

Parameters:
pIndex neighbor index
Returns:
neighboring space object
Remarks:
fails if index is out of bounds

const math::Vector< space::real > & NeighborGroup::value ( unsigned int  pIndex  )  const

return value of neighbor relation

Parameters:
pIndex neighbor index
Returns:
value
Remarks:
fails if index is out of bounds

const math::Vector< space::real > & NeighborGroup::direction ( unsigned int  pIndex  )  const

return direction of neighbor relation

Parameters:
pIndex neighbor index
Returns:
direction
Remarks:
fails if index is out of bounds

space::real NeighborGroup::distance ( unsigned int  pIndex  )  const

return distance of neighbor relation

Parameters:
pIndex neighbor index
Returns:
distance
Remarks:
fails if index is out of bounds

QVector< SpaceNeighborRelation * > & NeighborGroup::neighborRelations (  ) 

return neighbor relations

Returns:
neighbor relations

SpaceNeighborRelation * NeighborGroup::neighborRelation ( unsigned int  pIndex  ) 

return neighbor relation

Parameters:
pIndex neighbor index
Returns:
neighbor relation
Remarks:
fails if index is out of bounds

const SpaceNeighborRelation * NeighborGroup::neighborRelation ( unsigned int  pIndex  )  const

return neighbor relation

Parameters:
pIndex neighbor index
Returns:
neighbor relation
Remarks:
fails if index is out of bounds

SpaceNeighborRelation * NeighborGroup::operator[] ( unsigned int  pIndex  ) 

return neighbor relation

Parameters:
pIndex neighbor index
Returns:
neighbor relation
Remarks:
fails if index is out of bounds

bool NeighborGroup::addNeighbor ( SpaceObject pNeighborObject  ) 

add neighbor object to neighbor list

Parameters:
pNeighborObject neighbor space object
Returns:
true, if neighbor object could be added, false otherwise
creates new neighbor relation

bool NeighborGroup::addNeighbor ( SpaceObject pNeighborObject,
real  pDistance,
const math::Vector< real > &  pDirection 
)

add neighbor object to neighbor list

Parameters:
pNeighborObject neighbor space object
pDistance distance
pDirection direction
Returns:
true, if neighbor object could be added, false otherwise
creates new neighbor relation

void NeighborGroup::removeNeighbor ( SpaceObject pNeighborObject  ) 

remove neighbor

Parameters:
pNeighborObject neighbor space object

void NeighborGroup::removeNeighbor ( unsigned int  pNeighborIndex  ) 

remove neighbor

Parameters:
pNeighborIndex index of neighbor space object

void NeighborGroup::removeNeighbors (  ) 

remove neighbors

base::String NeighborGroup::info ( int  pPropagationLevel = 0  )  const [virtual]

print neighbor collection information

Parameters:
pPropagationLevel how far the propagation method proceeds through composite classes (-1: unlimited, 0: no proceeding, >0: limited proceeding)


Friends And Related Function Documentation

friend class SpaceProxyObject [friend]

friend class NeighborGroupAlg [friend]

std::ostream& operator<< ( std::ostream &  pOstream,
const NeighborGroup pNeighborGroup 
) [friend]

retrieve textual neighbor group info

Parameters:
pOstream output text stream
pNeighborGroup neighbor group


Member Data Documentation

const base::String NeighborGroup::sClassName [static]

class name

SpaceObject* iso::space::NeighborGroup::mSpaceObject [protected]

space object

Space* iso::space::NeighborGroup::mSpace [protected]

space this neighborlist is based on

bool iso::space::NeighborGroup::mVisible [protected]

visibility of space object in this space

NeighborGroupAlg* iso::space::NeighborGroup::mNeighborGroupAlg [protected]

neighborhood algorithm

QVector<SpaceNeighborRelation*> iso::space::NeighborGroup::mNeighborRelations [protected]

list of neighbor relations


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 14:08:15 2011 for iso_space by  doxygen 1.5.1