1SoCounter(3IV)()                                              SoCounter(3IV)()
2
3
4

NAME

6       SoCounter — triggered integer counter
7

INHERITS FROM

9       SoBase > SoFieldContainer > SoEngine > SoCounter
10

SYNOPSIS

12       #include <Inventor/engines/SoCounter.h>
13
14          Inputs from class SoCounter:
15
16     SoSFShort           min
17     SoSFShort           max
18     SoSFShort           step
19     SoSFTrigger         trigger
20     SoSFShort           reset
21
22          Outputs from class SoCounter:
23
24     (SoSFShort)         output
25     (SoSFTrigger)       syncOut
26
27          Methods from class SoCounter:
28
29                         SoCounter()
30
31          Methods from class SoEngine:
32
33     static SoType       getClassTypeId()
34     virtual int         getOutputs(SoEngineOutputList &list) const
35     SoEngineOutput *    getOutput(const SbName &outputName) const
36     SbBool              getOutputName(const  SoEngineOutput  *output,  SbName
37                              &outputName) const
38     SoEngine *          copy() const
39     static SoEngine *   getByName(const SbName &name)
40     static int          getByName(const SbName &name, SoEngineList &list)
41
42          Methods from class SoFieldContainer:
43
44     void                setToDefaults()
45     SbBool              hasDefaultValues() const
46     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
47     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
48                              copyConnections = FALSE)
49     SbBool              set(const char *fieldDataString)
50     void                get(SbString &fieldDataString)
51     virtual int         getFields(SoFieldList &resultList) const
52     virtual SoField *   getField(const SbName &fieldName) const
53     SbBool              getFieldName(const SoField *field, SbName &fieldName)
54                              const
55     SbBool              isNotifyEnabled() const
56     SbBool              enableNotify(SbBool flag)
57
58          Methods from class SoBase:
59
60     void                ref()
61     void                unref() const
62     void                unrefNoDelete() const
63     void                touch()
64     virtual SoType      getTypeId() const
65     SbBool              isOfType(SoType type) const
66     virtual void        setName(const SbName &name)
67     virtual SbName      getName() const
68
69

DESCRIPTION

71       This engine is a counter that outputs numbers, starting  at  a  minimum
72       value,  increasing  by a step value, and ending with a number that does
73       not exceed the maximum value. It outputs the next number  whenever  the
74       trigger input is touched. When the maximum number is reached, it starts
75       counting from the beginning again.
76
77       At any time the counter can be reset to a specific value by setting the
78       reset  input  field  to that value.  The next time the counter is trig‐
79       gered it will start counting from there. Note  that  the  counter  will
80       always  output  numbers based on the min, max and step values, and set‐
81       ting the reset value does not affect those input fields. If  the  reset
82       value  is  not  a legal counter value, the counter will still behave as
83       though it is.
84
85          If reset is greater than max, the counter is set to max.
86          If reset is less than min, the counter is set to min.
87          If reset is between steps, the counter is set to the lower step value.
88
89
90
91     Each time a counting cycle is started, the syncOut output  is  triggered.
92     This output can be used to synchronize some other event with the counting
93     cycle.
94

INPUTS

96     SoSFShort           min
97          Minimum value for the counter.
98
99     SoSFShort           max
100          Maximum value for the counter.
101
102     SoSFShort           step
103          Counter step value.
104
105     SoSFTrigger         trigger
106          Go to the next step.
107
108     SoSFShort           reset
109          At the next trigger, reset the counter to the specified value.
110
111

OUTPUTS

113     (SoSFShort)         output
114          Counts min-to-max in step increments.
115
116     (SoSFTrigger)       syncOut
117          Triggers at cycle start.
118
119

METHODS

121                         SoCounter()
122          Constructor
123
124

FILE FORMAT/DEFAULTS

126       Counter {
127          min      0
128          max      1
129          step     1
130          trigger
131          reset    0
132     }
133

SEE ALSO

135       SoTimeCounter, SoEngineOutput
136
137
138
139
140                                                              SoCounter(3IV)()
Impressum