Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

TimeSegmentC Class Reference

Time segment class. More...

#include <TimeSegmentC.h>

Inheritance diagram for TimeSegmentC:

EditableI DataBlockI List of all members.

Public Methods

virtual Edit::DataBlockIcreate ()
 Create new time segment.

virtual Edit::DataBlockIcreate (Edit::EditableI *pOriginal)
 Creates new time segment (used internally), see Edit::EditableI::create().

virtual void copy (Edit::EditableI *pEditable)
 Deep copy from a data block, see Edit::DataBlockI::copy().

virtual void restore (Edit::EditableI *pEditable)
 Shallow copy from a editable, see Edit::EditableI::restore().

virtual PajaTypes::int32 get_segment_start ()
 Returns the origo of the time segment.

virtual void set_segment_start (PajaTypes::int32 i32Start)
 Sets the origo of the time segment.

virtual PajaTypes::int32 get_key_count ()
 Returns the number of keys.

virtual KeyCget_key (PajaTypes::int32 i32Index)
 Returns a key at specified index.

virtual void del_key (PajaTypes::int32 i32Index)
 Deletes a key at specified index.

virtual PajaTypes::int32 get_key_time (PajaTypes::int32 i32Index)
 Returns the time of the key.

virtual void set_key_time (PajaTypes::int32 i32Index, PajaTypes::int32 i32Time)
 Sets the time of a key.

virtual KeyCget_key_at_time (PajaTypes::int32 i32Time)
 Returns a key at specified time.

virtual KeyCadd_key_at_time (PajaTypes::int32 i32Time)
 Adds a key at specified time.

virtual void sort_keys ()
 Sort the keys based on the time of a key.

virtual bool is_visible (PajaTypes::int32 i32Time)
 Returns true if there is visible segment at given time.

virtual PajaTypes::uint32 save (FileIO::SaveC *pSave)
 Serialize the time segment to a Demopaja output stream.

virtual PajaTypes::uint32 load (FileIO::LoadC *pLoad)
 Serialize the time segment from a Demopaja input stream.


Static Public Methods

TimeSegmentC * create_new ()
 Create new time segment.

TimeSegmentC * create_new (PajaTypes::int32 i32SegmentStart, PajaTypes::int32 i32SegmentEnd)
 Create new time segment.


Protected Methods

 TimeSegmentC ()
 Default constructor.

 TimeSegmentC (PajaTypes::int32 i32SegmentStart, PajaTypes::int32 i32SegmentLength)
 Creates new time segment.

 TimeSegmentC (Edit::EditableI *pOriginal)
 Default constructor with reference to the original.

virtual ~TimeSegmentC ()
 Default destructor.


Detailed Description

Time segment class.

Time segment class implements the visibility control for Demopaja layers and effects. The time segment has a origo in time and set of keys. The origo is treated as the beginning of the effect (or for example begin of animation the effect plays). Every two keys defines a segment where the is_visible() method returns true (the layer/effect is visible). If there is odd number of keys the last key is ignored.

The time values of the keys in a time segment are stored relative to the time origo. The methods, which operates the keys based in time uses the same time space as the time segment itself.

The changes made to the time segment is saved to a undo object if present.

This class is implemented by the system.

See also:
KeyC


Constructor & Destructor Documentation

TimeSegmentC   [protected]
 

Default constructor.

TimeSegmentC PajaTypes::int32    i32SegmentStart,
PajaTypes::int32    i32SegmentLength
[protected]
 

Creates new time segment.

TimeSegmentC Edit::EditableI   pOriginal [protected]
 

Default constructor with reference to the original.

virtual ~TimeSegmentC   [protected, virtual]
 

Default destructor.


Member Function Documentation

virtual KeyC* add_key_at_time PajaTypes::int32    i32Time [virtual]
 

Adds a key at specified time.

The time is in the same time space as the origo, even keys are relative to the origo of the time segment.

virtual void copy Edit::EditableI   pEditable [virtual]
 

Deep copy from a data block, see Edit::DataBlockI::copy().

Implements EditableI.

virtual Edit::DataBlockI* create Edit::EditableI   pOriginal [virtual]
 

Creates new time segment (used internally), see Edit::EditableI::create().

Implements EditableI.

virtual Edit::DataBlockI* create   [virtual]
 

Create new time segment.

Sets the origo of the time segment to zero. Noe keys are created.

Implements EditableI.

TimeSegmentC* create_new PajaTypes::int32    i32SegmentStart,
PajaTypes::int32    i32SegmentEnd
[static]
 

Create new time segment.

Sets the origo of the timesegment to i32SegmentStart and creates two keys, first at the point in time of i32SegmentStart and second at the point in time of i32SegmentEnd.

TimeSegmentC* create_new   [static]
 

Create new time segment.

Sets the origo of the time segment to zero. Noe keys are created.

virtual void del_key PajaTypes::int32    i32Index [virtual]
 

Deletes a key at specified index.

virtual KeyC* get_key PajaTypes::int32    i32Index [virtual]
 

Returns a key at specified index.

virtual KeyC* get_key_at_time PajaTypes::int32    i32Time [virtual]
 

Returns a key at specified time.

The time is in the same time space as the origo, even keys are relative to the origo of the time segment.

virtual PajaTypes::int32 get_key_count   [virtual]
 

Returns the number of keys.

virtual PajaTypes::int32 get_key_time PajaTypes::int32    i32Index [virtual]
 

Returns the time of the key.

The returned time is in the same time space as the origo, even keys are relative to the origo of the time segment.

virtual PajaTypes::int32 get_segment_start   [virtual]
 

Returns the origo of the time segment.

virtual bool is_visible PajaTypes::int32    i32Time [virtual]
 

Returns true if there is visible segment at given time.

virtual PajaTypes::uint32 load FileIO::LoadC   pLoad [virtual]
 

Serialize the time segment from a Demopaja input stream.

Implements EditableI.

virtual void restore Edit::EditableI   pEditable [virtual]
 

Shallow copy from a editable, see Edit::EditableI::restore().

Implements EditableI.

virtual PajaTypes::uint32 save FileIO::SaveC   pSave [virtual]
 

Serialize the time segment to a Demopaja output stream.

Implements EditableI.

virtual void set_key_time PajaTypes::int32    i32Index,
PajaTypes::int32    i32Time
[virtual]
 

Sets the time of a key.

The time is in the same time space as the origo, even keys are relative to the origo of the time segment.

virtual void set_segment_start PajaTypes::int32    i32Start [virtual]
 

Sets the origo of the time segment.

virtual void sort_keys   [virtual]
 

Sort the keys based on the time of a key.


Moppi Demopaja SDK Documentation -- Copyright © 2000-2002 Moppi Productions