.TH "SoElapsedTime" 3 "Sat Oct 12 2013" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoElapsedTime \- .PP The \fBSoElapsedTime\fP class is a controllable time source engine\&. .PP The additional functionality provided by this engine versus just connecting to the realTime global field is the ability to control the speed of the time source plus logic to reset, stop and restart it\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoEngine\fP\&. .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 "\fBSoElapsedTime\fP (void)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "\fIThis static method returns the \fBSoType\fP object associated with objects of this class\&. \fP" .ti -1c .RI "static void * \fBcreateInstance\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "\fISets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. \fP" .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoSFTime\fP \fBtimeIn\fP" .br .ti -1c .RI "\fBSoSFFloat\fP \fBspeed\fP" .br .ti -1c .RI "\fBSoSFBool\fP \fBon\fP" .br .ti -1c .RI "\fBSoSFBool\fP \fBpause\fP" .br .ti -1c .RI "\fBSoSFTrigger\fP \fBreset\fP" .br .ti -1c .RI "\fBSoEngineOutput\fP \fBtimeOut\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual \fB~SoElapsedTime\fP (void)" .br .ti -1c .RI "virtual void \fBwriteInstance\fP (\fBSoOutput\fP *out)" .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 \fBSoElapsedTime\fP class is a controllable time source engine\&. .PP The additional functionality provided by this engine versus just connecting to the realTime global field is the ability to control the speed of the time source plus logic to reset, stop and restart it\&. Simple usage example, combined with \fBSoComposeRotation\fP: .PP .PP .nf #Inventor V2\&.1 ascii Separator { Transform { rotation = ComposeRotation { axis 0 1 0 angle = ElapsedTime { }\&.timeOut }\&.rotation } Cube { } } .fi .PP .PP \fBSee Also:\fP .RS 4 \fBSoTimeCounter\fP .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "SoElapsedTime::SoElapsedTime (void)" Default constructor\&. .SS "SoElapsedTime::~SoElapsedTime (void)\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoElapsedTime::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 ** SoElapsedTime::getInputDataPtr (void)\fC [static]\fP, \fC [protected]\fP" Returns the \fBSoFieldData\fP class which holds information about inputs in this engine\&. .PP Reimplemented from \fBSoEngine\fP\&. .SS "const \fBSoEngineOutputData\fP ** SoElapsedTime::getOutputDataPtr (void)\fC [static]\fP, \fC [protected]\fP" Returns the \fBSoEngineOutputData\fP class which holds information about the outputs in this engine\&. .PP Reimplemented from \fBSoEngine\fP\&. .SS "const \fBSoFieldData\fP * SoElapsedTime::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 * SoElapsedTime::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\&. .SS "void SoElapsedTime::writeInstance (\fBSoOutput\fP *out)\fC [protected]\fP, \fC [virtual]\fP" Writes all the fields contained in this instance to the output stream within \fIout\fP\&. .PP This method is solely called from the write methods of fields\&. .PP Either from \fBSoField\fP if the write is done because of a field-to-field connection, or from one of the fields which may actually write \fBSoFieldContainer\fP instances, i\&.e\&. \fBSoSFNode\fP, \fBSoMFNode\fP, \fBSoSFEngine\fP, \fBSoMFEngine\fP, \fBSoSFPath\fP and \fBSoMFPath\fP\&. .PP This method, in addition to the ordinary write() method of \fBSoNode\fP, needs to be present since the fields don't have a write action instance in their writeValue() method, and \fBwriteInstance()\fP will create a new \fBSoWriteAction\fP and call continueToApply() on it\&. .PP Reimplemented from \fBSoEngine\fP\&. .SH "Member Data Documentation" .PP .SS "\fBSoSFTime\fP SoElapsedTime::timeIn" Input time value\&. Default connected to the global realTime field\&. .SS "\fBSoSFFloat\fP SoElapsedTime::speed" Decides how fast the timer should run, measured versus 'real time' from the timeIn field\&. Default value is 1\&.0\&. .PP A negative value makes the time go backward\&. .SS "\fBSoSFBool\fP SoElapsedTime::on" Shuts timer on and off\&. Will restart at the same position\&. .SS "\fBSoSFBool\fP SoElapsedTime::pause" Shuts timer on and off\&. Will restart at the position it would have been if not paused (i\&.e\&. doesn't 'lose time')\&. .SS "\fBSoSFTrigger\fP SoElapsedTime::reset" Restart timer at 0\&. .SS "\fBSoEngineOutput\fP SoElapsedTime::timeOut" (\fBSoSFTime\fP) Output time value\&. Starts at 0\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.