hx3d  1
2D/3D Simple Game Framework
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
hx3d::audio::Display Class Referenceabstract

Audio effect display. More...

#include <display.hpp>

Public Member Functions

 Display ()
 Create an empty display with a refresh delay of 50. More...
 
 Display (const int refreshDelay)
 Create an empty display with a custom refresh delay. More...
 
void initialize (const unsigned int width, const unsigned int height)
 Initialize the display. More...
 
void setRefreshDelay (const int refreshDelay)
 Set the refresh delay. More...
 
virtual void update (const Sint16 *stream, const int length, const float delta)=0
 Update the display. More...
 
virtual void onInitialization ()
 Use this to execute code after initialization. More...
 
- Public Member Functions inherited from hx3d::graphics::Sprite
 Sprite ()
 Create a sprite without texture. More...
 
void setTexture (const Ptr< Texture > &texture)
 Set the sprite texture. More...
 
void setTexture (Framebuffer &buffer)
 Set the sprite texture from a framebuffer color buffer. More...
 
void setTexture (TextureRegion &region)
 Set the sprite texture from a texture region. More...
 
Ptr< TexturegetTexture ()
 Get the sprite texture. More...
 
void scaleTexture ()
 Scale the texture coordinates following the texture size.
 
virtual void draw (Ptr< Shader > shader) override
 Draw the mesh using a shader. More...
 
- Public Member Functions inherited from hx3d::graphics::Mesh
void setTint (Color tint)
 Set the mesh tint. More...
 
ColorgetTint ()
 Get the mesh tint. More...
 
void updateColor ()
 Update the mesh color from the tint.
 
void setGeometry (Ptr< geom::BaseGeometry > geometry)
 Set the mesh geometry. More...
 
Ptr< geom::BaseGeometry > & getGeometry ()
 Get the mesh geometry. More...
 

Protected Member Functions

void drawBorders ()
 Draw white borders.
 

Protected Attributes

graphics::Image _image
 Drawing image.
 
Timer _timer
 Refresh timer.
 
int _refreshDelay
 Refresh delay.
 
bool _initialized
 Is the display initialized ?
 
- Protected Attributes inherited from hx3d::graphics::Mesh
Color _tint
 Tint color.
 
Ptr< geom::BaseGeometry_geometry
 Current geometry.
 

Additional Inherited Members

- Public Attributes inherited from hx3d::graphics::Mesh
Transform transform
 Mesh transformation.
 

Detailed Description

Audio effect display.

Inherit from Sprite.

See also
Spectrum
Waveform

Definition at line 41 of file display.hpp.

Constructor & Destructor Documentation

hx3d::audio::Display::Display ( )

Create an empty display with a refresh delay of 50.

See also
initialize to construct the texture.

Definition at line 28 of file display.cpp.

hx3d::audio::Display::Display ( const int  refreshDelay)

Create an empty display with a custom refresh delay.

See also
initialize to construct the texture.
Parameters
refreshDelayRefresh delay

Definition at line 29 of file display.cpp.

Member Function Documentation

void hx3d::audio::Display::initialize ( const unsigned int  width,
const unsigned int  height 
)

Initialize the display.

Parameters
widthWidth
heightHeight

Definition at line 32 of file display.cpp.

void hx3d::audio::Display::onInitialization ( )
virtual

Use this to execute code after initialization.

See also
Spectrum::onInitialization.

Reimplemented in hx3d::audio::Spectrum.

Definition at line 49 of file display.cpp.

void hx3d::audio::Display::setRefreshDelay ( const int  refreshDelay)

Set the refresh delay.

Parameters
refreshDelayRefresh delay

Definition at line 44 of file display.cpp.

virtual void hx3d::audio::Display::update ( const Sint16 *  stream,
const int  length,
const float  delta 
)
pure virtual

Update the display.

Parameters
streamStream of amplitudes (between -32767 and 32767)
lengthLength of the stream
deltaDelta time

Implemented in hx3d::audio::Spectrum, and hx3d::audio::Waveform.


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