.TH "SoTimeCounter" 3 "Thu May 29 2014" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoTimeCounter \- .PP The \fBSoTimeCounter\fP class is an integer counter engine\&. .PP The \fBSoTimeCounter\fP engine is by default connected to the realTime global field, and does stepwise updates on the \fBSoTimeCounter::output\fP field according to the field settings\&. .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 "\fBSoTimeCounter\fP ()" .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 ()" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoSFTime\fP \fBtimeIn\fP" .br .ti -1c .RI "\fBSoSFShort\fP \fBmin\fP" .br .ti -1c .RI "\fBSoSFShort\fP \fBmax\fP" .br .ti -1c .RI "\fBSoSFShort\fP \fBstep\fP" .br .ti -1c .RI "\fBSoSFBool\fP \fBon\fP" .br .ti -1c .RI "\fBSoSFFloat\fP \fBfrequency\fP" .br .ti -1c .RI "\fBSoMFFloat\fP \fBduty\fP" .br .ti -1c .RI "\fBSoSFShort\fP \fBreset\fP" .br .ti -1c .RI "\fBSoSFTrigger\fP \fBsyncIn\fP" .br .ti -1c .RI "\fBSoEngineOutput\fP \fBoutput\fP" .br .ti -1c .RI "\fBSoEngineOutput\fP \fBsyncOut\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual \fB~SoTimeCounter\fP (void)" .br .ti -1c .RI "virtual void \fBinputChanged\fP (\fBSoField\fP *which)" .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 \fBSoTimeCounter\fP class is an integer counter engine\&. .PP The \fBSoTimeCounter\fP engine is by default connected to the realTime global field, and does stepwise updates on the \fBSoTimeCounter::output\fP field according to the field settings\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoTimeCounter::SoTimeCounter (void)" Default constructor\&. .SS "SoTimeCounter::~SoTimeCounter (void)\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoTimeCounter::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 * SoTimeCounter::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 * SoTimeCounter::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 SoTimeCounter::inputChanged (\fBSoField\fP *which)\fC [protected]\fP, \fC [virtual]\fP" Called when an input is changed\&. The default method does nothing, but subclasses may override this method to do The Right Thing when a specific field is changed\&. .PP Reimplemented from \fBSoEngine\fP\&. .SS "void SoTimeCounter::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 SoTimeCounter::timeIn" Running time\&. Connected to the \fIrealTime\fP field by default\&. .SS "\fBSoSFShort\fP SoTimeCounter::min" Minimum counter value\&. Default value is 0\&. .SS "\fBSoSFShort\fP SoTimeCounter::max" Maximum counter value\&. Default value is 1\&. .SS "\fBSoSFShort\fP SoTimeCounter::step" Counter step size\&. Default value is 1\&. .SS "\fBSoSFBool\fP SoTimeCounter::on" Set to \fCFALSE\fP to pause the counter\&. Default value is \fCTRUE\fP\&. .SS "\fBSoSFFloat\fP SoTimeCounter::frequency" Number of complete cycles from the min value to the max value per second\&. Default value is 1\&.0\&. .SS "\fBSoMFFloat\fP SoTimeCounter::duty" Used to weight step times\&. Supply one weight value per step\&. Default array is a single value of 1\&.0\&. .SS "\fBSoSFShort\fP SoTimeCounter::reset" Manually set the counter to some value\&. If \fBSoTimeCounter::reset\fP is set below the \fBSoTimeCounter::min\fP value or above the \fBSoTimeCounter::max\fP value it will be clamped to the closest boundary value\&. .SS "\fBSoSFTrigger\fP SoTimeCounter::syncIn" Restart counter at the minimum value\&. .SS "\fBSoEngineOutput\fP SoTimeCounter::output" (\fBSoSFShort\fP) The counter value\&. .SS "\fBSoEngineOutput\fP SoTimeCounter::syncOut" (\fBSoSFTrigger\fP) Triggers every cycle start\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.