Choreonoid  1.8
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
cnoid::CoordinateFrameListItem Class Reference

#include <CoordinateFrameListItem.h>

Inheritance diagram for cnoid::CoordinateFrameListItem:
cnoid::Item cnoid::RenderableItem cnoid::Referenced cnoid::LinkOffsetFrameListItem

Public Types

enum  ItemizationMode { NoItemization, SubItemization, IndependentItemization }
- Public Types inherited from cnoid::Item
enum  Attribute {
  SubItem, Attached, Temporal, LoadOnly,
  NumAttributes, SUB_ITEM = SubItem, TEMPORAL = Temporal, LOAD_ONLY = LoadOnly
enum  CheckId { LogicalSumOfAllChecks = -1, PrimaryCheck = 0 }
typedef std::function< bool(Item *item)> ItemPredicate

Public Member Functions

 CoordinateFrameListItem ()
 CoordinateFrameListItem (CoordinateFrameList *frameList)
 CoordinateFrameListItem (const CoordinateFrameListItem &org)
virtual ~CoordinateFrameListItem ()
int itemizationMode () const
bool isNoItemizationMode () const
void setItemizationMode (int mode)
void customizeFrameItemDisplayName (std::function< std::string(const CoordinateFrameItem *item)> func)
std::string getFrameItemDisplayName (const CoordinateFrameItem *item) const
void updateFrameItems ()
CoordinateFrameItemfindFrameItemAt (int index)
CoordinateFrameItemfindFrameItem (const GeneralId &id)
CoordinateFrameListframeList ()
const CoordinateFrameListframeList () const
void useAsBaseFrames ()
void useAsOffsetFrames ()
bool isForBaseFrames () const
bool isForOffsetFrames () const
virtual LocationProxyPtr getFrameParentLocationProxy ()
bool getRelativeFramePosition (const CoordinateFrame *frame, Isometry3 &out_T) const
bool getGlobalFramePosition (const CoordinateFrame *frame, Isometry3 &out_T) const
bool switchFrameMode (CoordinateFrame *frame, int mode)
virtual SgNodegetScene () override
void setFrameMarkerVisible (const CoordinateFrame *frame, bool on)
ReferencedPtr transientFrameMarkerHolder (const CoordinateFrame *frame)
bool isFrameMarkerVisible (const CoordinateFrame *frame) const
SignalProxy< void(int index, bool on)> sigFrameMarkerVisibilityChanged ()
virtual bool store (Archive &archive) override
virtual bool restore (const Archive &archive) override
- Public Member Functions inherited from cnoid::Item
virtual ~Item ()
Itemoperator= (const Item &rhs)=delete
int classId () const
ItemcreateNewInstance () const
void assign (Item *srcItem)
 Copy item properties as much as possible like the assignment operator. More...
Itemduplicate (Item *duplicatedParentItem=nullptr) const
ItemduplicateSubTree () const
 This function creates a copy of the item including its descendant items. More...
ItemduplicateAll () const
const std::string & name () const
virtual bool setName (const std::string &name)
virtual std::string displayName () const
void setDisplayNameModifier (std::function< std::string(const Item *item)> modifier)
SignalProxy< void(const std::string &oldName)> sigNameChanged ()
void notifyNameChange ()
 This function notifies the system of a displayName change. More...
void setAttribute (Attribute attribute)
void unsetAttribute (Attribute attribute)
bool hasAttribute (Attribute attribute) const
bool isSubItem () const
void setSubItemAttributes ()
bool isTemporal () const
void setTemporal (bool on=true)
bool isSelected () const
void setSelected (bool on, bool isCurrent=false)
void setSubTreeItemsSelected (bool on)
bool isChecked (int checkId=PrimaryCheck) const
void setChecked (bool on)
void setChecked (int checkId, bool on)
int numCheckStates () const
int numChildren () const
int countDescendantItems () const
ItemchildItem () const
ItemprevItem () const
ItemnextItem () const
ItemlastChildItem () const
ItemparentItem () const
ItemheadItem () const
RootItemfindRootItem () const
bool isConnectedToRoot () const
ItemlocalRootItem () const
bool addChildItem (Item *item, bool isManualOperation=false)
bool insertChildItem (Item *item, Item *nextItem, bool isManualOperation=false)
bool insertChild (Item *position, Item *item, bool isManualOperation=false)
bool addSubItem (Item *item)
bool insertSubItem (Item *item, Item *nextItem)
void removeFromParentItem ()
void detachFromParentItem ()
void clearChildren ()
template<class ItemType >
ItemType * find (const std::string &path="")
ItemfindItem (const std::string &path) const
template<class ItemType >
ItemType * findItem (const std::string &path) const
template<class ItemType >
ItemType * findItem (std::function< bool(ItemType *item)> pred=nullptr) const
ItemfindChildItem (const std::string &path, std::function< bool(Item *item)> pred=nullptr) const
template<class ItemType >
ItemType * findChildItem (const std::string &path, std::function< bool(ItemType *item)> pred=nullptr) const
template<class ItemType >
ItemType * findChildItem (std::function< bool(ItemType *item)> pred=nullptr) const
ItemfindSubItem (const std::string &path) const
template<class ItemType >
ItemType * findSubItem (const std::string &path="") const
template<class ItemType >
ItemType * findOwnerItem (bool includeSelf=false) const
bool isOwnedBy (Item *item) const
ItemList childItems (std::function< bool(Item *item)> pred=nullptr) const
template<class ItemType >
ItemList< ItemType > childItems (std::function< bool(ItemType *item)> pred=nullptr) const
ItemList descendantItems (std::function< bool(Item *item)> pred=nullptr) const
template<class ItemType >
ItemList< ItemType > descendantItems (std::function< bool(ItemType *item)> pred=nullptr) const
ItemList selectedDescendantItems (std::function< bool(Item *item)> pred=nullptr) const
template<class ItemType >
ItemList< ItemType > selectedDescendantItems (std::function< bool(Item *item)> pred=nullptr) const
bool traverse (std::function< bool(Item *)> pred)
template<class ItemType >
bool traverse (std::function< bool(ItemType *item)> pred=nullptr)
SignalProxy< void()> sigTreePathChanged ()
SignalProxy< void()> sigTreePositionChanged ()
SignalProxy< void(Item *topItem, Item *prevTopParentItem)> sigTreePositionChanged2 ()
SignalProxy< void()> sigPositionChanged ()
SignalProxy< void()> sigSubTreeChanged ()
SignalProxy< void()> sigDisconnectedFromRoot ()
SignalProxy< void()> sigDetachedFromRoot ()
SignalProxy< void(bool on)> sigSelectionChanged ()
SignalProxy< void(int checkId, bool on)> sigAnyCheckToggled ()
SignalProxy< void(bool on)> sigCheckToggled (int checkId=PrimaryCheck)
virtual void notifyUpdate ()
SignalProxy< void()> sigUpdated ()
bool setAddon (ItemAddon *addon)
void removeAddon (ItemAddon *addon)
template<class AddonType >
AddonType * findAddon ()
template<class AddonType >
AddonType * getAddon ()
std::vector< ItemAddon * > addons ()
bool load (const std::string &filename, const std::string &format=std::string(), const Mapping *options=nullptr)
bool load (const std::string &filename, Item *parent, const std::string &format=std::string(), const Mapping *options=nullptr)
bool save (const std::string &filename, const std::string &format=std::string(), const Mapping *options=nullptr)
bool overwrite (bool forceOverwrite=false, const std::string &format=std::string())
const std::string & filePath () const
 Full path file name. More...
std::string fileName () const
 File name without the directory. More...
const std::string & fileFormat () const
const MappingfileOptions () const
std::time_t fileModificationTime () const
bool isConsistentWithFile () const
void updateFileInformation (const std::string &filename, const std::string &format, Mapping *options=nullptr)
void setConsistentWithFile (bool isConsistent)
void suggestFileUpdate ()
void clearFileInformation ()
 Use this function to disable the implicit overwrite next time. More...
bool reload ()
bool replace (Item *originalItem)
ItemfindOriginalItem () const
ItemfindReplacementItem () const
void putProperties (PutPropertyFunction &putProperty)
- Public Member Functions inherited from cnoid::Referenced
virtual ~Referenced ()
- Public Member Functions inherited from cnoid::RenderableItem
 RenderableItem ()
virtual ~RenderableItem ()
virtual bool isSceneSensitive ()
virtual void setSceneSensitive (bool on)
virtual SignalProxy< void(bool on)> sigSceneSensitiveChanged ()

Static Public Member Functions

static void initializeClass (ExtensionManager *ext)
static SignalProxy< void(CoordinateFrameListItem *frameListItem, bool on)> sigListAssociationWith (Item *item)
- Static Public Member Functions inherited from cnoid::Item
template<class ItemType >
static ItemPredicate getItemPredicate ()
template<class ItemType >
static ItemPredicate getItemPredicate (std::function< bool(ItemType *item)> pred)
static Itemfind (const std::string &path)

Protected Member Functions

virtual ItemdoDuplicate () const override
 Override this function to allow duplication of an instance. More...
virtual void onTreePositionChanged () override
virtual void onDisconnectedFromRoot () override
virtual bool onChildItemAboutToBeAdded (Item *childItem, bool isManualOperation) override
virtual void doPutProperties (PutPropertyFunction &putProperty) override
- Protected Member Functions inherited from cnoid::Item
 Item ()
 Item (const std::string &name)
 Item (const Item &item)
virtual void doAssign (Item *srcItem)
 Implement the code to copy properties like the assingment operator. More...
virtual ItemdoDuplicate (Item *duplicatedParentItem) const
virtual bool onNewTreePositionCheck (bool isManualOperation, std::function< void()> &out_callbackWhenAdded)
virtual void onAddedToParent ()
virtual void onTreePathChanged ()
virtual void onPositionChanged ()
virtual void onConnectedToRoot ()
virtual void onRemovedFromParent (Item *parentItem, bool isParentBeingDeleted)
- Protected Member Functions inherited from cnoid::Referenced
 Referenced ()
 Referenced (const Referenced &)
int refCount () const


class CoordinateFrameItem

Member Enumeration Documentation

◆ ItemizationMode

A coordinate frame list consists of coordinate frame elements and the list to hold them. To manage it on the Choreonoid GUI, CoordinateFrameListItem and CoordinateFrameItem are introduced. Basically, the former corresponds to the coordinate frame list and the latter corresponds to each coordinate frame element. However, how to use CoordinateFrameItems depends on ItemizationMode.


In this mode, CoordinateFrameItem is not used and a user cannot see each frame element in the item tree.


In this mode, each frame item is attached to the list item with the SubItem attribute, and the frame items are managed by the list item.


In this mode, each frame item is attached to the list item with the Attached attribute, and the frame items are handled as an item independent of the list item.

Constructor & Destructor Documentation

◆ CoordinateFrameListItem() [1/3]

CoordinateFrameListItem::CoordinateFrameListItem ( )

◆ CoordinateFrameListItem() [2/3]

CoordinateFrameListItem::CoordinateFrameListItem ( CoordinateFrameList frameList)

◆ CoordinateFrameListItem() [3/3]

CoordinateFrameListItem::CoordinateFrameListItem ( const CoordinateFrameListItem org)

◆ ~CoordinateFrameListItem()

CoordinateFrameListItem::~CoordinateFrameListItem ( )

Member Function Documentation

◆ customizeFrameItemDisplayName()

void CoordinateFrameListItem::customizeFrameItemDisplayName ( std::function< std::string(const CoordinateFrameItem *item)>  func)

◆ doDuplicate()

Item * CoordinateFrameListItem::doDuplicate ( ) const

Override this function to allow duplication of an instance.

Reimplemented from cnoid::Item.

Reimplemented in cnoid::LinkOffsetFrameListItem.

◆ doPutProperties()

void CoordinateFrameListItem::doPutProperties ( PutPropertyFunction putProperty)

This function is used to put a standard properties of the item. You can implement the standard properties by overriding this function.

The overridden function should call the same function of the parent class.

Reimplemented from cnoid::Item.

◆ findFrameItem()

CoordinateFrameItem * CoordinateFrameListItem::findFrameItem ( const GeneralId id)

◆ findFrameItemAt()

CoordinateFrameItem * CoordinateFrameListItem::findFrameItemAt ( int  index)

◆ frameList() [1/2]

const CoordinateFrameList * CoordinateFrameListItem::frameList ( )

◆ frameList() [2/2]

const CoordinateFrameList* cnoid::CoordinateFrameListItem::frameList ( ) const

◆ getFrameItemDisplayName()

std::string CoordinateFrameListItem::getFrameItemDisplayName ( const CoordinateFrameItem item) const

◆ getFrameParentLocationProxy()

LocationProxyPtr CoordinateFrameListItem::getFrameParentLocationProxy ( )

Reimplemented in cnoid::LinkOffsetFrameListItem.

◆ getGlobalFramePosition()

bool CoordinateFrameListItem::getGlobalFramePosition ( const CoordinateFrame frame,
Isometry3 out_T 
) const

◆ getRelativeFramePosition()

bool CoordinateFrameListItem::getRelativeFramePosition ( const CoordinateFrame frame,
Isometry3 out_T 
) const

◆ getScene()

SgNode * CoordinateFrameListItem::getScene ( )

Implements cnoid::RenderableItem.

◆ initializeClass()

void CoordinateFrameListItem::initializeClass ( ExtensionManager ext)

◆ isForBaseFrames()

bool CoordinateFrameListItem::isForBaseFrames ( ) const

◆ isForOffsetFrames()

bool CoordinateFrameListItem::isForOffsetFrames ( ) const

◆ isFrameMarkerVisible()

bool CoordinateFrameListItem::isFrameMarkerVisible ( const CoordinateFrame frame) const

◆ isNoItemizationMode()

bool CoordinateFrameListItem::isNoItemizationMode ( ) const

◆ itemizationMode()

int CoordinateFrameListItem::itemizationMode ( ) const

◆ onChildItemAboutToBeAdded()

bool CoordinateFrameListItem::onChildItemAboutToBeAdded ( Item childItem,
bool  isManualOperation 

This function is called when a child item is about to be added to this item. By overriding this function, you can check a child item and prevent the item from being added if necessary.

false if the item cannot be accepted as a child item
The childItem is not actually connected to the item when this function is called.

Reimplemented from cnoid::Item.

◆ onDisconnectedFromRoot()

void CoordinateFrameListItem::onDisconnectedFromRoot ( )

Reimplemented from cnoid::Item.

◆ onTreePositionChanged()

void CoordinateFrameListItem::onTreePositionChanged ( )

This function is similar to the onTreePathChanged function. The condition to call this function is same as sigTreePositionChanged, and the order in which it is called precedes the signal.

Reimplemented from cnoid::Item.

◆ restore()

bool CoordinateFrameListItem::restore ( const Archive archive)

Reimplemented from cnoid::Item.

◆ setFrameMarkerVisible()

void CoordinateFrameListItem::setFrameMarkerVisible ( const CoordinateFrame frame,
bool  on 

◆ setItemizationMode()

void CoordinateFrameListItem::setItemizationMode ( int  mode)

◆ sigFrameMarkerVisibilityChanged()

SignalProxy< void(int index, bool on)> CoordinateFrameListItem::sigFrameMarkerVisibilityChanged ( )

◆ sigListAssociationWith()

SignalProxy< void(CoordinateFrameListItem *frameListItem, bool on)> CoordinateFrameListItem::sigListAssociationWith ( Item item)

◆ store()

bool CoordinateFrameListItem::store ( Archive archive)

Reimplemented from cnoid::Item.

◆ switchFrameMode()

bool CoordinateFrameListItem::switchFrameMode ( CoordinateFrame frame,
int  mode 

◆ transientFrameMarkerHolder()

ReferencedPtr CoordinateFrameListItem::transientFrameMarkerHolder ( const CoordinateFrame frame)

◆ updateFrameItems()

void CoordinateFrameListItem::updateFrameItems ( )

◆ useAsBaseFrames()

void CoordinateFrameListItem::useAsBaseFrames ( )

◆ useAsOffsetFrames()

void CoordinateFrameListItem::useAsOffsetFrames ( )

Friends And Related Function Documentation

◆ CoordinateFrameItem

friend class CoordinateFrameItem

The documentation for this class was generated from the following files: