MCPcopy Create free account
hub / github.com/cinder/Cinder / Character

Method Character

samples/_timeline/TextInputTween/src/Character.cpp:17–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15using namespace std;
16
17Character::Character( gl::TextureFontRef textureFont, string character, mat4 matrix )
18{
19 mTextureFont = textureFont;
20 mChar = character;
21
22 mColorStart = ColorAf( 1.0f, 0.5f, 0.0f, 0.0f );
23 mColorCur = mColorStart;
24
25 float hue = Rand::randFloat( 0.55f, 0.6f );
26 float sat = Rand::randFloat( 0.5f, 1.0f );
27 mColorDest = ColorAf( CM_HSV, hue, sat, 1.0f, 1.0f );
28 mMatrix = mDestMatrix = matrix;
29
30 mKernBounds = Rectf( 0.0f, 0.0f, mTextureFont->measureString( mChar ).x, mTextureFont->getAscent() );
31
32 mIsDead = false;
33}
34
35void Character::animIn( Timeline &timeline, mat4 matrix )
36{

Callers

nothing calls this directly

Calls 3

randFloatFunction · 0.85
measureStringMethod · 0.80
getAscentMethod · 0.80

Tested by

no test coverage detected