.TH "SoOneShot" 3 "Thu May 29 2014" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoOneShot \- .PP The \fBSoOneShot\fP class is a timer that runs for a configurable time and then stops\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoEngine\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBFlags\fP { \fBRETRIGGERABLE\fP =1, \fBHOLD_FINAL\fP =2 }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const " .br .RI "\fIReturns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. \fP" .ti -1c .RI "virtual const \fBSoFieldData\fP * \fBgetFieldData\fP (void) const " .br .ti -1c .RI "virtual const \fBSoEngineOutputData\fP * \fBgetOutputData\fP (void) const " .br .ti -1c .RI "\fBSoOneShot\fP (void)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void * \fBcreateInstance\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoSFTime\fP \fBtimeIn\fP" .br .ti -1c .RI "\fBSoSFTime\fP \fBduration\fP" .br .ti -1c .RI "\fBSoSFTrigger\fP \fBtrigger\fP" .br .ti -1c .RI "\fBSoSFBitMask\fP \fBflags\fP" .br .ti -1c .RI "\fBSoSFBool\fP \fBdisable\fP" .br .ti -1c .RI "\fBSoEngineOutput\fP \fBtimeOut\fP" .br .ti -1c .RI "\fBSoEngineOutput\fP \fBisActive\fP" .br .ti -1c .RI "\fBSoEngineOutput\fP \fBramp\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual \fB~SoOneShot\fP (void)" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static const \fBSoFieldData\fP ** \fBgetInputDataPtr\fP (void)" .br .ti -1c .RI "static const \fBSoEngineOutputData\fP ** \fBgetOutputDataPtr\fP (void)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoOneShot\fP class is a timer that runs for a configurable time and then stops\&. .SH "Member Enumeration Documentation" .PP .SS "enum \fBSoOneShot::Flags\fP" There are two flags available: \fCRETRIGGERABLE\fP will cause the engine to restart at 0 if the \fBSoOneShot::trigger\fP field is activated during a run (otherwise the trigger is ignored during runs)\&. .PP \fCHOLD_FINAL\fP will make the engine outputs keep their values after a run, instead of resetting them\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoOneShot::SoOneShot (void)" Default constructor\&. .SS "SoOneShot::~SoOneShot (void)\fC [protected]\fP, \fC [virtual]\fP" Destructor is protected to avoid explicit destruction\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoOneShot::getTypeId (void) const\fC [virtual]\fP" .PP Returns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. Usage example: .PP .PP .nf void foo(SoNode * node) { if (node->getTypeId() == SoFile::getClassTypeId()) { SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type } } .fi .PP .PP For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in \fIall\fP subclasses\&. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance \fBInventor/nodes/SoSubNode\&.h\fP (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine\&.h (for engine classes) and so on\&. .PP For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups\&. .PP Implements \fBSoBase\fP\&. .SS "const \fBSoFieldData\fP * SoOneShot::getFieldData (void) const\fC [virtual]\fP" Returns a pointer to the class-wide field data storage object for this instance\&. If no fields are present, returns \fCNULL\fP\&. .PP Reimplemented from \fBSoFieldContainer\fP\&. .SS "const \fBSoEngineOutputData\fP * SoOneShot::getOutputData (void) const\fC [virtual]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .PP Implements \fBSoEngine\fP\&. .SH "Member Data Documentation" .PP .SS "\fBSoSFTime\fP SoOneShot::timeIn" Input time source\&. Connected by default to the realTime global field, but the application programmer is free to change this to any other time source\&. .SS "\fBSoSFTime\fP SoOneShot::duration" The time the engine should run for when it is triggered\&. Defaults to 1 second\&. .SS "\fBSoSFTrigger\fP SoOneShot::trigger" A pulse on this input field starts the engine\&. .SS "\fBSoSFBitMask\fP SoOneShot::flags" Control flags\&. See \fBSoOneShot::Flags\fP\&. .SS "\fBSoSFBool\fP SoOneShot::disable" Set to \fCTRUE\fP to disable the engine completely\&. .SS "\fBSoEngineOutput\fP SoOneShot::timeOut" (\fBSoSFTime\fP) Output time\&. Will run from 0 to the value of \fBSoOneShot::duration\fP\&. .SS "\fBSoEngineOutput\fP SoOneShot::isActive" (\fBSoSFBool\fP) \fCTRUE\fP while the engine is running, \fCFALSE\fP otherwise\&. .SS "\fBSoEngineOutput\fP SoOneShot::ramp" (\fBSoSFFloat\fP) Will run from 0 to 1 during the active period\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.