OpenCMISS-Zinc C++ API Documentation
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Attributes | List of all members
OpenCMISS::Zinc::Timesequence Class Reference

A non-decreasing list of times at which nodal parameters can be stored. More...

#include <timesequence.hpp>

Public Member Functions

 Timesequence (cmzn_timesequence_id in_time_sequence_id)
 
 Timesequence (const Timesequence &timeSequence)
 
Timesequenceoperator= (const Timesequence &timeSequence)
 
bool isValid () const
 
cmzn_timesequence_id getId () const
 
int getNumberOfTimes ()
 
double getTime (int timeIndex)
 
int setTime (int timeIndex, double time)
 

Protected Attributes

cmzn_timesequence_id id
 

Detailed Description

A non-decreasing list of times at which nodal parameters can be stored.

A non-decreasing list of times at which nodal parameters can be stored. Setting a timesequence for a field in a nodetemplate establishes storage for N values of each component x type x version at the node (with N = the number of times in the timesequence), indexed by looking up time in the timesequence and linearly interpolating between stored times. Note that if time-varying parameters are required, a time sequence must be set when the node field is first defined: it is not currently possible to add time variation to a node field that is not time-varying (but it is possible to merge or add times to an existing time-varying node field).

See Also
Fieldmodule::getMatchingTimesequence
Nodetemplate::setTimesequence

Member Function Documentation

cmzn_timesequence_id OpenCMISS::Zinc::Timesequence::getId ( ) const
inline

Return the C handle of the Timesequence object.

Returns
C handle of Timesequence if this objects is valid, 0 otherwise.
int OpenCMISS::Zinc::Timesequence::getNumberOfTimes ( )
inline

Gets the number of times in the time sequence.

Returns
The number of times.
double OpenCMISS::Zinc::Timesequence::getTime ( int  timeIndex)
inline

Gets the time at the given time_index in the time sequence.

Parameters
timeIndexThe index of the time to get, starting at 1.
Returns
The time or 0 if error.
bool OpenCMISS::Zinc::Timesequence::isValid ( ) const
inline

Check if this is a valid Timesequence object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Timesequence::setTime ( int  timeIndex,
double  time 
)
inline

Sets the time for the given time_index in the time sequence. This can only be done while the time sequence is not in use by other objects. If the sequence does not have as many times as the <time_index> then it will be expanded and the unspecified times also set to <time>.

Parameters
timeIndexThe index of the time to set, starting at 1.
timeThe time to set.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.

The documentation for this class was generated from the following file: