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

Composition::TimeSegmentC Class Reference

Time segment class. More...

#include <TimeSegmentC.h>

Inheritance diagram for Composition::TimeSegmentC:

Edit::EditableI Edit::DataBlockI List of all members.

Public Methods

Static Public Methods

Protected Methods


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.

~TimeSegmentC ( ) [protected, virtual]
 

Default destructor.


Member Function Documentation

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.

void copy ( Edit::DataBlockI * pBlock ) [virtual]
 

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

Reimplemented from Edit::EditableI.

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

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

Reimplemented from Edit::EditableI.

Edit::DataBlockI * create ( ) [virtual]
 

Create new time segment.

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

Reimplemented from Edit::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.

void del_key ( PajaTypes::int32 i32Index ) [virtual]
 

Deletes a key at specified index.

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

Returns a key at specified index.

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.

PajaTypes::int32 get_key_count ( ) [virtual]
 

Returns the number of keys.

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.

PajaTypes::int32 get_segment_start ( ) [virtual]
 

Returns the origo of the time segment.

bool is_visible ( PajaTypes::int32 i32Time ) [virtual]
 

Returns true if there is visible segment at given time.

PajaTypes::uint32 load ( FileIO::LoadC * pLoad ) [virtual]
 

Serialize the time segment from a Demopaja input stream.

Reimplemented from Edit::EditableI.

void restore ( Edit::EditableI * pEditable ) [virtual]
 

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

Reimplemented from Edit::EditableI.

PajaTypes::uint32 save ( FileIO::SaveC * pSave ) [virtual]
 

Serialize the time segment to a Demopaja output stream.

Reimplemented from Edit::EditableI.

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.

void set_segment_start ( PajaTypes::int32 i32Start ) [virtual]
 

Sets the origo of the time segment.

void sort_keys ( ) [virtual]
 

Sort the keys based on the time of a key.


The documentation for this class was generated from the following file:
Moppi Demopaja SDK Documentation -- Copyright © 2000 Moppi Productions