libvisual  0.5.0
Public Member Functions | Static Public Member Functions | Friends | List of all members
LV::Morph Class Reference

Morph class. More...

#include <libvisual/lv_morph.h>

Public Member Functions

 Morph (Morph const &morph)=delete
 
Morphoperator= (Morph const &)=delete
 
VisPluginData * get_plugin ()
 Returns the plugin object. More...
 
bool realize ()
 Realizes a morph. More...
 
VisVideoDepth get_supported_depths ()
 Returns the set of colour depths natively supported. More...
 
VisVideoAttrOptions const * get_video_attribute_options ()
 
void set_video (VideoPtr const &video)
 Sets the video target for rendering. More...
 
void set_time (Time const &time)
 Sets the morph duration. More...
 
void set_progress (float progress)
 Sets the progress of a morph. More...
 
Palette const * get_palette ()
 Returns the colour palette used. More...
 
bool is_done ()
 Determines if morph has completed. More...
 
bool run (Audio const &audio, VideoPtr const &src1, VideoPtr const &src2)
 Runs the morph. More...
 

Static Public Member Functions

static MorphPtr load (std::string const &name)
 Creates a new Morph wit a plugin of a given name. More...
 

Friends

void intrusive_ptr_add_ref (Morph const *morph)
 
void intrusive_ptr_release (Morph const *morph)
 

Detailed Description

Morph class.

Definition at line 50 of file lv_morph.h.

Member Function Documentation

Palette const * LV::Morph::get_palette ( )

Returns the colour palette used.

Note
Only 8-bit morphs will have colour palettes.
Returns
Colour palette, or nullptr if there is none

Definition at line 140 of file lv_morph.cpp.

Referenced by run().

VisPluginData * LV::Morph::get_plugin ( )

Returns the plugin object.

Returns
Plugin object

Definition at line 72 of file lv_morph.cpp.

VisVideoDepth LV::Morph::get_supported_depths ( )

Returns the set of colour depths natively supported.

Returns
Set of supported depths

Definition at line 115 of file lv_morph.cpp.

bool LV::Morph::is_done ( )

Determines if morph has completed.

Returns
true if completed, false otherwise

Definition at line 146 of file lv_morph.cpp.

MorphPtr LV::Morph::load ( std::string const &  name)
static

Creates a new Morph wit a plugin of a given name.

See Also
realize()
Parameters
nameName of plugin to load
Returns
New morph, or nullptr if plugin failed to load

Definition at line 77 of file lv_morph.cpp.

bool LV::Morph::realize ( )

Realizes a morph.

This also calls the plugin init() method.

Returns
true on success, false otherwise

Definition at line 110 of file lv_morph.cpp.

bool LV::Morph::run ( Audio const &  audio,
VideoPtr const &  src1,
VideoPtr const &  src2 
)

Runs the morph.

Note
The rendering will be performed on the Video set with set_video().
Parameters
audioAudio data
src1First source Video
src2Second source Video
Returns
true on success, false otherwise

Definition at line 156 of file lv_morph.cpp.

void LV::Morph::set_progress ( float  progress)

Sets the progress of a morph.

Parameters
progressProgress of morph (must be in [0.0, 1.0])

Definition at line 135 of file lv_morph.cpp.

void LV::Morph::set_time ( Time const &  time)

Sets the morph duration.

Parameters
timeDuration

Definition at line 130 of file lv_morph.cpp.

void LV::Morph::set_video ( VideoPtr const &  video)

Sets the video target for rendering.

Parameters
videoVideo target

Definition at line 125 of file lv_morph.cpp.


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