Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osg::Switch Class Reference

#include <OSGSwitch.h>

Inheritance diagram for osg::Switch:

osg::SwitchBase osg::Group osg::GroupBase osg::NodeCore osg::AttachmentContainer osg::FieldContainer List of all members.

Public Types

typedef SwitchPtr Ptr
Enum
enum  { ALL = -2, NONE = -1 }

Public Member Functions

Parents
*MFNodePtrgetParents (void)
const MFNodePtrgetParents (void) const
MFNodePtrgetMFParents (void)
Volume
*virtual void invalidateVolume (void)
Handle Attachments
*void addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
void subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
AttachmentPtr findAttachment (UInt32 groupId, UInt16 binding=0)
AttachmentPtr findAttachment (const FieldContainerType &type, UInt16 binding=0)
Field Access *SFAttachmentMapgetSFAttachments (void)
Get Instance Type Information
UInt32 getTypeId (void) const
UInt16 getGroupId (void) const
const Char8getTypeName (void) const
Generic Field Access *FieldgetField (UInt32 fieldId)
FieldgetField (const Char8 *fieldName)
Sync
*virtual void changed (BitVector whichField, UInt32 origin)
Dump
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFInt32getSFChoice (void)
 Get the Switch::_sfChoice field.
Int32getChoice (void)
 Get the value of the Switch::_sfChoice field.
const Int32getChoice (void) const
 Get the value of the Switch::_sfChoice field.
Field Set
*void setChoice (const Int32 &value)
 Set the value of the Switch::_sfChoice field.
Binary Access
*virtual UInt32 getBinSize (const BitVector &whichField)
virtual void copyToBin (BinaryDataHandler &pMem, const BitVector &whichField)
virtual void copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField)
Copy
*virtual FieldContainerPtr shallowCopy (void) const
Parents
*MFNodePtrgetParents (void)
const MFNodePtrgetParents (void) const
MFNodePtrgetMFParents (void)
Volume
*virtual void invalidateVolume (void)
Handle Attachments
*void addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
void subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
AttachmentPtr findAttachment (UInt32 groupId, UInt16 binding=0)
AttachmentPtr findAttachment (const FieldContainerType &type, UInt16 binding=0)
Field Access *SFAttachmentMapgetSFAttachments (void)
Get Instance Type Information
UInt32 getTypeId (void) const
UInt16 getGroupId (void) const
const Char8getTypeName (void) const
Generic Field Access *FieldgetField (UInt32 fieldId)
FieldgetField (const Char8 *fieldName)

Static Public Member Functions

Get Class Type Information
static UInt16 getClassGroupId (void)
Class Get
*static FieldContainerTypegetClassType (void)
 access the type of the class
static UInt32 getClassTypeId (void)
 access the numerical type of the class
Construction
*static SwitchPtr create (void)
 create a new instance of the class
static SwitchPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype
Get Class Type Information
static UInt16 getClassGroupId (void)

Static Public Attributes

static const osg::BitVector ChoiceFieldMask
static const osg::BitVector MTInfluenceMask
static const BitVector ParentsFieldMask = (1 << NodeCore::ParentsFieldId )
static const BitVector AttachmentsFieldMask
static const BitVector NextFieldMask
CoredNodePtr helper
*static const bool isNodeCore = true
CoredNodePtr helper
*static const bool isNodeCore = true

Protected Types

typedef SwitchBase Inherited

Protected Member Functions

Sync
void executeSyncImpl (NodeCore *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (FieldContainer *pOther, const BitVector &whichField)
MT Destruction
*virtual void onDestroy (void)
Set / Get Parents
*void addParent (const NodePtr &parent)
void subParent (const NodePtr &parent)
Pointer
*NodeCorePtr getPtr (void) const
Pointer
*AttachmentContainerPtr getPtr (void)
Transformation
*virtual void accumulateMatrix (Matrix &result)
Volume
*virtual void adjustVolume (Volume &volume)
MT Edit
template<class FieldTypeT>
*void beginEditX (const BitVector &whichField, FieldTypeT &field)
template<class FieldTypeT>
void endEditX (const BitVector &whichField, FieldTypeT &field)
MT Construction
*void onCreate (const FieldContainer *source=NULL)
void onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL)
Constructors
Switch (void)
 Switch (const Switch &source)
Destructors
*virtual ~Switch (void)
Draw
*Action::ResultE draw (Action *action)
Intersect
*Action::ResultE intersect (Action *action)
Sync
*void executeSyncImpl (SwitchBase *pOther, const BitVector &whichField)
virtual void executeSync (FieldContainer &other, const BitVector &whichField)
Sync
*void executeSyncImpl (GroupBase *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (NodeCore *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField)
Sync
void executeSyncImpl (FieldContainer *pOther, const BitVector &whichField)
Action Callbacks
*Action::ResultE drawEnter (Action *action)
Action::ResultE drawLeave (Action *action)
Action::ResultE renderEnter (Action *action)
Action::ResultE renderLeave (Action *action)
MT Destruction
*virtual void onDestroy (void)
Set / Get Parents
*void addParent (const NodePtr &parent)
void subParent (const NodePtr &parent)
Pointer
*NodeCorePtr getPtr (void) const
Pointer
*AttachmentContainerPtr getPtr (void)
Transformation
*virtual void accumulateMatrix (Matrix &result)
Volume
*virtual void adjustVolume (Volume &volume)
MT Edit
template<class FieldTypeT>
*void beginEditX (const BitVector &whichField, FieldTypeT &field)
template<class FieldTypeT>
void endEditX (const BitVector &whichField, FieldTypeT &field)
MT Construction
*void onCreate (const FieldContainer *source=NULL)
void onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL)

Static Protected Member Functions

Create Fieldcontainer
template<class ObjectPtrT>
*static void newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP)
template<class ObjectPtrT>
static void newPtr (ObjectPtrT &result)
Create Fieldcontainer
template<class ObjectPtrT>
*static void newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP)
template<class ObjectPtrT>
static void newPtr (ObjectPtrT &result)

Protected Attributes

Fields
*MFNodePtr _parents
Fields
*SFAttachmentMap _attachmentMap
Member
*UInt32 _shares
Fields
*SFInt32 _sfChoice
Fields
*MFNodePtr _parents
Fields
*SFAttachmentMap _attachmentMap
Member
*UInt32 _shares

Private Member Functions

void operator= (const Switch &source)
 prohibit default function (move to 'public' if needed)

Static Private Member Functions

Class Specific
*static void initMethod (void)

Friends

class FieldContainer
class SwitchBase

Detailed Description

Definition at line 52 of file OSGSwitch.h.


Member Typedef Documentation

typedef SwitchBase osg::Switch::Inherited [protected]
 

Reimplemented from osg::SwitchBase.

Definition at line 83 of file OSGSwitch.h.

typedef SwitchPtr osg::SwitchBase::Ptr [inherited]
 

Reimplemented from osg::GroupBase.

Definition at line 90 of file OSGSwitchBase.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
ALL 
NONE 

Reimplemented from osg::SwitchBase.

Definition at line 61 of file OSGSwitch.h.

00061 { ALL = -2, NONE = -1 };


Constructor & Destructor Documentation

Switch::Switch void   )  [protected]
 

Definition at line 75 of file OSGSwitch.cpp.

00075                    :
00076     Inherited()
00077 {
00078 }

Switch::Switch const Switch source  )  [protected]
 

Definition at line 80 of file OSGSwitch.cpp.

00080                                    :
00081     Inherited(source)
00082 {
00083 }

Switch::~Switch void   )  [protected, virtual]
 

Definition at line 88 of file OSGSwitch.cpp.

00089 {
00090 }


Member Function Documentation

void Switch::changed BitVector  whichField,
UInt32  origin
[virtual]
 

Reimplemented from osg::Group.

Definition at line 58 of file OSGSwitch.cpp.

References osg::Group::changed().

00059 {
00060     Inherited::changed(whichField, origin);
00061 }

void Switch::dump UInt32  uiIndent = 0,
const BitVector  bvFlags = 0
const [virtual]
 

Reimplemented from osg::Group.

Definition at line 66 of file OSGSwitch.cpp.

References SLOG.

00068 {
00069     SLOG << "Dump Switch NI" << std::endl;
00070 }

Action::ResultE Switch::draw Action action  )  [protected]
 

Definition at line 95 of file OSGSwitch.cpp.

References osg::Action::addNode(), ALL, osg::Action::Continue, osg::SwitchBase::getChoice(), osg::NodePtr::getCPtr(), osg::Action::getNNodes(), osg::Action::getNode(), osg::DrawActionBase::isVisible(), osg::DrawActionBase::selectVisibles(), osg::Action::Skip, and osg::Action::useNodeList().

Referenced by initMethod().

00096 {
00097     Action::ResultE  returnValue = Action::Continue;
00098 
00099     DrawActionBase  *da          = dynamic_cast<DrawActionBase *>(action);
00100 
00101     if((getChoice() >= 0                          ) && 
00102        (UInt32(getChoice()) < action->getNNodes()))
00103     {
00104         da->useNodeList();
00105 
00106         if(da->isVisible(action->getNode(getChoice()).getCPtr()))
00107         {
00108             da->addNode(action->getNode(getChoice()));
00109         }
00110     }
00111     else if(getChoice() == ALL)
00112     {
00113         if(da->selectVisibles() == 0)
00114             returnValue = Action::Skip;
00115     }
00116     else
00117     {
00118         returnValue = Action::Skip;
00119     }
00120 
00121     return returnValue;
00122 }

Action::ResultE Switch::intersect Action action  )  [protected]
 

Reimplemented from osg::Group.

Definition at line 124 of file OSGSwitch.cpp.

References osg::Action::addNode(), ALL, osg::Action::Continue, osg::SwitchBase::getChoice(), osg::Action::getNNodes(), osg::Action::getNode(), and osg::Action::Skip.

Referenced by initMethod().

00125 {
00126     Action::ResultE  returnValue = Action::Continue;
00127 
00128     IntersectAction  *da          = dynamic_cast<IntersectAction *>(action);
00129 
00130     if((getChoice() >= 0                          ) && 
00131        (UInt32(getChoice()) < action->getNNodes()))
00132     {
00133         da->addNode(action->getNode(getChoice()));
00134     }
00135     else if(getChoice() == ALL)
00136     {
00137         returnValue = Action::Continue;
00138     }
00139     else
00140     {
00141         returnValue = Action::Skip;
00142     }
00143 
00144     return returnValue;
00145 }

void Switch::initMethod void   )  [static, private]
 

Reimplemented from osg::Group.

Definition at line 150 of file OSGSwitch.cpp.

References draw(), osg::SwitchBase::getClassType(), intersect(), osg::osgTypedMethodFunctor2BaseCPtrRef(), osg::IntersectAction::registerEnterDefault(), osg::RenderAction::registerEnterDefault(), and osg::DrawAction::registerEnterDefault().

void osg::Switch::operator= const Switch source  )  [private]
 

osg::FieldContainerType & osg::SwitchBase::getClassType void   )  [inline, static, inherited]
 

Reimplemented from osg::GroupBase.

Definition at line 58 of file OSGSwitchBase.inl.

References osg::SwitchBase::_type.

Referenced by osg::SwitchBase::create(), initMethod(), osg::SplitGraphOp::isGroup(), and osg::MergeGraphOp::isGroup().

00059 {
00060     return _type; 
00061 } 

osg::UInt32 osg::SwitchBase::getClassTypeId void   )  [inline, static, inherited]
 

Reimplemented from osg::GroupBase.

Definition at line 65 of file OSGSwitchBase.inl.

References osg::SwitchBase::_type, and osg::TypeBase::getId().

00066 {
00067     return _type.getId(); 
00068 } 

FieldContainerType & SwitchBase::getType void   )  [virtual, inherited]
 

Reimplemented from osg::GroupBase.

Definition at line 106 of file OSGSwitchBase.cpp.

References osg::SwitchBase::_type.

00107 {
00108     return _type; 
00109 } 

const FieldContainerType & SwitchBase::getType void   )  const [virtual, inherited]
 

Reimplemented from osg::GroupBase.

Definition at line 111 of file OSGSwitchBase.cpp.

References osg::SwitchBase::_type.

00112 {
00113     return _type;
00114 } 

UInt32 SwitchBase::getContainerSize void   )  const [virtual, inherited]
 

Reimplemented from osg::GroupBase.

Definition at line 126 of file OSGSwitchBase.cpp.

00127 { 
00128     return sizeof(Switch); 
00129 }

SFInt32 * osg::SwitchBase::getSFChoice void   )  [inline, inherited]
 

Definition at line 101 of file OSGSwitchBase.inl.

References osg::SwitchBase::_sfChoice.

00102 {
00103     return &_sfChoice;
00104 }

Int32 & osg::SwitchBase::getChoice void   )  [inline, inherited]
 

Definition at line 109 of file OSGSwitchBase.inl.

References osg::SwitchBase::_sfChoice, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by draw(), and intersect().

00110 {
00111     return _sfChoice.getValue();
00112 }

const Int32 & osg::SwitchBase::getChoice void   )  const [inline, inherited]
 

Definition at line 116 of file OSGSwitchBase.inl.

References osg::SwitchBase::_sfChoice, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00117 {
00118     return _sfChoice.getValue();
00119 }

void osg::SwitchBase::setChoice const Int32 value  )  [inline, inherited]
 

Definition at line 123 of file OSGSwitchBase.inl.

References osg::SwitchBase::_sfChoice, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00124 {
00125     _sfChoice.setValue(value);
00126 }

UInt32 SwitchBase::getBinSize const BitVector whichField  )  [virtual, inherited]
 

Reimplemented from osg::GroupBase.

Definition at line 188 of file OSGSwitchBase.cpp.

References osg::SwitchBase::_sfChoice, osg::SwitchBase::ChoiceFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::GroupBase::getBinSize(), and osg::FieldBits::NoField.

00189 {
00190     UInt32 returnValue = Inherited::getBinSize(whichField);
00191 
00192     if(FieldBits::NoField != (ChoiceFieldMask & whichField))
00193     {
00194         returnValue += _sfChoice.getBinSize();
00195     }
00196 
00197 
00198     return returnValue;
00199 }

void SwitchBase::copyToBin BinaryDataHandler pMem,
const BitVector whichField
[virtual, inherited]
 

Reimplemented from osg::GroupBase.

Definition at line 201 of file OSGSwitchBase.cpp.

References osg::SwitchBase::_sfChoice, osg::SwitchBase::ChoiceFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::GroupBase::copyToBin(), and osg::FieldBits::NoField.

00203 {
00204     Inherited::copyToBin(pMem, whichField);
00205 
00206     if(FieldBits::NoField != (ChoiceFieldMask & whichField))
00207     {
00208         _sfChoice.copyToBin(pMem);
00209     }
00210 
00211 
00212 }

void SwitchBase::copyFromBin BinaryDataHandler pMem,
const BitVector whichField
[virtual, inherited]
 

Reimplemented from osg::GroupBase.

Definition at line 214 of file OSGSwitchBase.cpp.

References osg::SwitchBase::_sfChoice, osg::SwitchBase::ChoiceFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::GroupBase::copyFromBin(), and osg::FieldBits::NoField.

00216 {
00217     Inherited::copyFromBin(pMem, whichField);
00218 
00219     if(FieldBits::NoField != (ChoiceFieldMask & whichField))
00220     {
00221         _sfChoice.copyFromBin(pMem);
00222     }
00223 
00224 
00225 }

SwitchPtr osg::SwitchBase::create void   )  [inline, static, inherited]
 

Reimplemented from osg::GroupBase.

Definition at line 72 of file OSGSwitchBase.inl.

References osg::AttachmentContainerPtr::dcast(), osg::SwitchBase::getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and osg::SwitchBase::shallowCopy().

Referenced by osg::VRMLSwitchDesc::init().

00073 {
00074     SwitchPtr fc; 
00075 
00076     if(getClassType().getPrototype() != OSG::NullFC) 
00077     {
00078         fc = SwitchPtr::dcast(
00079             getClassType().getPrototype()-> shallowCopy()); 
00080     }
00081     
00082     return fc; 
00083 }

SwitchPtr osg::SwitchBase::createEmpty void   )  [inline, static, inherited]
 

Reimplemented from osg::GroupBase.

Definition at line 87 of file OSGSwitchBase.inl.

References osg::FieldContainer::newPtr().

00088 { 
00089     SwitchPtr returnValue; 
00090     
00091     newPtr(returnValue); 
00092 
00093     return returnValue; 
00094 }

FieldContainerPtr SwitchBase::shallowCopy void   )  const [virtual, inherited]
 

Reimplemented from osg::GroupBase.

Definition at line 117 of file OSGSwitchBase.cpp.

References osg::FieldContainer::newPtr().

Referenced by osg::SwitchBase::create().

00118 { 
00119     SwitchPtr returnValue; 
00120 
00121     newPtr(returnValue, dynamic_cast<const Switch *>(this)); 
00122 
00123     return returnValue; 
00124 }

void SwitchBase::executeSyncImpl SwitchBase pOther,
const BitVector whichField
[protected, inherited]
 

Definition at line 228 of file OSGSwitchBase.cpp.

References osg::SwitchBase::_sfChoice, osg::SwitchBase::ChoiceFieldMask, osg::GroupBase::executeSyncImpl(), osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith().

Referenced by osg::SwitchBase::executeSync().

00230 {
00231 
00232     Inherited::executeSyncImpl(pOther, whichField);
00233 
00234     if(FieldBits::NoField != (ChoiceFieldMask & whichField))
00235         _sfChoice.syncWith(pOther->_sfChoice);
00236 
00237 
00238 }

void GroupBase::executeSyncImpl GroupBase pOther,
const BitVector whichField
[protected, inherited]
 

Definition at line 191 of file OSGGroupBase.cpp.

References osg::NodeCore::executeSyncImpl().

Referenced by osg::GroupBase::executeSync(), osg::TransformBase::executeSyncImpl(), osg::SwitchBase::executeSyncImpl(), osg::ProxyGroupBase::executeSyncImpl(), osg::MaterialPoolBase::executeSyncImpl(), osg::MaterialGroupBase::executeSyncImpl(), osg::InverseTransformBase::executeSyncImpl(), osg::DistanceLODBase::executeSyncImpl(), and osg::BillboardBase::executeSyncImpl().

00193 {
00194 
00195     Inherited::executeSyncImpl(pOther, whichField);
00196 
00197 
00198 }

void osg::NodeCore::executeSyncImpl NodeCore pOther,
const BitVector whichField
[inline, protected, inherited]
 

Definition at line 180 of file OSGNodeCore.inl.

References osg::NodeCore::_parents, osg::AttachmentContainer::executeSyncImpl(), osg::FieldBits::NoField, osg::NodeCore::ParentsFieldMask, and osg::MField< FieldTypeT, fieldNameSpace >::syncWith().

Referenced by osg::NodeCore::executeSync(), osg::StateSortingGroupBase::executeSyncImpl(), osg::LightEnvBase::executeSyncImpl(), osg::LightBase::executeSyncImpl(), osg::InlineBase::executeSyncImpl(), osg::GroupBase::executeSyncImpl(), osg::DVRVolumeBase::executeSyncImpl(), and osg::DrawableBase::executeSyncImpl().

00182 {
00183     Inherited::executeSyncImpl(pOther, whichField);
00184 
00185     if(FieldBits::NoField != (ParentsFieldMask & whichField))
00186     {
00187         _parents.syncWith(pOther->_parents);
00188     }
00189 }

void AttachmentContainer::executeSyncImpl AttachmentContainer pOther,
const BitVector whichField
[protected, inherited]
 

Definition at line 316 of file OSGAttachmentContainer.cpp.

References osg::AttachmentContainer::_attachmentMap, osg::AttachmentContainer::AttachmentsFieldMask, osg::FieldContainer::executeSyncImpl(), osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith().

Referenced by osg::AttachmentContainer::executeSync(), osg::WindowBase::executeSyncImpl(), osg::ViewportBase::executeSyncImpl(), osg::ShaderParameterBase::executeSyncImpl(), osg::Node::executeSyncImpl(), osg::NodeCore::executeSyncImpl(), osg::MaterialBase::executeSyncImpl(), osg::ImageComposerBase::executeSyncImpl(), osg::ImageBase::executeSyncImpl(), osg::ForegroundBase::executeSyncImpl(), osg::DisplayCalibrationBase::executeSyncImpl(), osg::CameraBase::executeSyncImpl(), and osg::BackgroundBase::executeSyncImpl().

00319 {
00320     Inherited::executeSyncImpl(pOther, whichField);
00321 
00322     if (FieldBits::NoField != (AttachmentsFieldMask & whichField))
00323     {
00324         _attachmentMap.syncWith(pOther->_attachmentMap);
00325     }
00326 }

void osg::FieldContainer::executeSyncImpl FieldContainer pOther,
const BitVector whichField
[inline, protected, inherited]
 

Definition at line 333 of file OSGFieldContainerImpl.inl.

Referenced by osg::StateBase::executeSyncImpl(), osg::DVRShaderBase::executeSyncImpl(), osg::DVRClipGeometryBase::executeSyncImpl(), osg::AttachmentContainer::executeSyncImpl(), and osg::Attachment::executeSyncImpl().

00335 {
00336 }

void SwitchBase::executeSync FieldContainer other,
const BitVector whichField
[protected, virtual, inherited]
 

Reimplemented from osg::GroupBase.

Definition at line 133 of file OSGSwitchBase.cpp.

References osg::SwitchBase::executeSyncImpl().

00135 {
00136     this->executeSyncImpl((SwitchBase *) &other, whichField);
00137 }

Action::ResultE Group::drawEnter Action action  )  [protected, inherited]
 

Reimplemented in osg::Billboard, osg::InverseTransform, osg::MaterialGroup, and osg::Transform.

Definition at line 100 of file OSGGroup.cpp.

References osg::Action::Continue, osg::DrawActionBase::selectVisibles(), and osg::Action::Skip.

Referenced by osg::Group::initMethod().

00101 {
00102     DrawActionBase *da = dynamic_cast<DrawActionBase *>(action);
00103 
00104     if(da->selectVisibles() == 0)
00105         return Action::Skip;
00106     
00107     return Action::Continue;
00108 }

Action::ResultE Group::drawLeave Action action  )  [protected, inherited]
 

Reimplemented in osg::Billboard, osg::InverseTransform, osg::MaterialGroup, and osg::Transform.

Definition at line 110 of file OSGGroup.cpp.

References osg::Action::Continue.

Referenced by osg::Group::initMethod().

00111 {
00112     return Action::Continue;
00113 }

Action::ResultE Group::renderEnter Action action