本文整理汇总了C++中GetScale函数的典型用法代码示例。如果您正苦于以下问题:C++ GetScale函数的具体用法?C++ GetScale怎么用?C++ GetScale使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetScale函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sRect
sRect CCBFrameLook::GetClientRect(CCFrame* pFrame, sRect& r)
{
if(GetCustomLook() == 1)
{
int al = FRAME_OUTLINE_WIDTH+FRAME_WIDTH+FRAME_INLINE_WIDTH+RECT_DEFAULT_SPACE;
int au = m_pFrameBitmaps[7]->GetHeight() + FRAME_OUTLINE_WIDTH + FRAME_INLINE_WIDTH+RECT_DEFAULT_SPACE;
return sRect(r.x+al, r.y+au, r.w-(al*2), r.h-(al+au));
}
if( GetCustomLook() == 2 )
{
#define CUSTOM2_FRAME_OFFSET_WIDTH 2
#define CUSTOM2_FRAME_OFFSET_HEIGHT 10
return sRect(r.x + CUSTOM2_FRAME_OFFSET_WIDTH, r.y + CUSTOM2_FRAME_OFFSET_HEIGHT , r.w - 2 * CUSTOM2_FRAME_OFFSET_WIDTH, r.h - 2 * CUSTOM2_FRAME_OFFSET_HEIGHT);
}
else
{
if(IsNull(m_pFrameBitmaps, FRAME_BITMAP_COUNT)==true) return r;
float fScale = GetScale();
int al = (int)(fScale * m_pFrameBitmaps[3]->GetWidth());
int au = (int)(fScale * m_pFrameBitmaps[7]->GetHeight());
int ar = (int)(fScale * m_pFrameBitmaps[5]->GetWidth());
int ab = (int)(fScale * m_pFrameBitmaps[1]->GetHeight());
return sRect(r.x+al, r.y+au, r.w-(al+ar), r.h-(au+ab));
}
}
示例2: NNode
NStar::NStar() : NNode(NodeStar)
{
Texture = NULL;
Changed = true;
glGenBuffers(2,Buffers);
Shader = GetGame()->GetRender()->GetShader("flat");
if (Shader != NULL)
{
MatrixLoc = Shader->GetUniformLocation("Model");
TextureLoc = Shader->GetUniformLocation("Texture");
ColorLoc = Shader->GetUniformLocation("Color");
}
Texture = GetGame()->GetRender()->GetTexture("star");
if (Texture)
{
unsigned int AnimationCount = Texture->GetAnimationCount();
Texture->Play(rand()%AnimationCount);
}
float Size = Rand(5,32);
SetScale(glm::vec3(Size,Size,1));
//float Rot = Rand(0,360);
//SetAng(glm::vec3(0,0,Rot));
SetParent(GetGame()->GetRender()->GetCamera());
SetPos(glm::vec3(GetGame()->GetWindowWidth()+GetScale().x,Rand(0,GetGame()->GetWindowHeight()),0));
}
示例3: GetScale
//*******************************************************************************
void CBCGPKnob::SetPointer(const CBCGPKnobPointer& pointer, BOOL bRedraw)
{
CBCGPCircularGaugeScale* pScale = GetScale(0);
if (pScale == NULL)
{
ASSERT(FALSE);
return;
}
double dblVal = pScale->GetStart();
if (m_arData.GetSize() > 0)
{
dblVal = GetValue();
delete m_arData[0];
m_arData.RemoveAt(0);
}
CBCGPKnobPointer* pData = new CBCGPKnobPointer;
pData->CopyFrom(pointer);
pData->SetValue(dblVal);
AddData(pData);
if (bRedraw)
{
Redraw();
}
}
示例4: NOTARY_ID
void OTOffer::UpdateContents()
{
const String NOTARY_ID(GetNotaryID()),
INSTRUMENT_DEFINITION_ID(GetInstrumentDefinitionID()),
CURRENCY_TYPE_ID(GetCurrencyID());
// I release this because I'm about to repopulate it.
m_xmlUnsigned.Release();
Tag tag("marketOffer");
tag.add_attribute("version", m_strVersion.Get());
tag.add_attribute("isSelling", formatBool(!IsBid()));
tag.add_attribute("notaryID", NOTARY_ID.Get());
tag.add_attribute("instrumentDefinitionID", INSTRUMENT_DEFINITION_ID.Get());
tag.add_attribute("currencyTypeID", CURRENCY_TYPE_ID.Get());
tag.add_attribute("priceLimit", formatLong(GetPriceLimit()));
tag.add_attribute("totalAssetsOnOffer",
formatLong(GetTotalAssetsOnOffer()));
tag.add_attribute("finishedSoFar", formatLong(GetFinishedSoFar()));
tag.add_attribute("marketScale", formatLong(GetScale()));
tag.add_attribute("minimumIncrement", formatLong(GetMinimumIncrement()));
tag.add_attribute("transactionNum", formatLong(GetTransactionNum()));
tag.add_attribute("validFrom", formatTimestamp(GetValidFrom()));
tag.add_attribute("validTo", formatTimestamp(GetValidTo()));
std::string str_result;
tag.output(str_result);
m_xmlUnsigned.Concatenate("%s", str_result.c_str());
}
示例5: v
LTVector HeadBobMgr::GetWeaponRotations() const
{
LTVector v( m_aAmpsActive[ HBE_WEAPONROTATION_X ],
m_aAmpsActive[ HBE_WEAPONROTATION_Y ],
m_aAmpsActive[ HBE_WEAPONROTATION_Z ] );
return ( v * GetScale() );
}
示例6: mMuzzleSpeed
Yarn::Yarn() :
mMuzzleSpeed( 400.f ),
mVelocity( Vector3::Zero ),
mPlayerId( 0 )
{
SetScale( GetScale() * .02f );
SetCollisionRadius( 15.f );
}
示例7: mVelocity
Yarn::Yarn() :
mVelocity( Vector3::Zero )
{
SetScale( GetScale() * 0.25f );
SetCollisionRadius( 0.125f );
mSpriteComponent = std::make_shared<SpriteComponent>( this );
mSpriteComponent->SetTexture( TextureManager::sInstance->GetTexture( "yarn" ) );
}
示例8: GetScale
Vect4 SceneItem::GetCrop()
{
Vect4 scaledCrop = crop;
Vect2 scale = GetScale();
scaledCrop.x /= scale.x; scaledCrop.y /= scale.y;
scaledCrop.z /= scale.y; scaledCrop.w /= scale.x;
return scaledCrop;
}
示例9: GetScale
//-----------------------------------------------------------------------------
bool Matrix22::IsUniformScale()const
{
float xScale, yScale = 0.0f;
GetScale(xScale, yScale);
return (!Dia::Maths::Float::FEqual(xScale, 1.0f) &&
!Dia::Maths::Float::FEqual(yScale, 1.0f) &&
Dia::Maths::Float::FEqual(xScale, yScale));
}
示例10: GetPosition
void Entity::SetRotation(float a_fRotation)
{
Vector3 vPosition = GetPosition();
Vector3 vScale = GetScale();
m_oLocalTransform = Matrix3x3::setupTranslation(vPosition)
* Matrix3x3::setupRotation(a_fRotation)
* Matrix3x3::setupScale(vScale);
}
示例11: GetScale
sRect CCBButtonLook::GetClientRect(CCButton* pButton, sRect& r)
{
float fScale = GetScale();
int al = (int)(fScale * GETWIDTH(m_pUpBitmaps[3]));
int au = (int)(fScale * GETHEIGHT(m_pUpBitmaps[7]));
int ar = (int)(fScale * GETWIDTH(m_pUpBitmaps[5]));
int ab = (int)(fScale * GETHEIGHT(m_pUpBitmaps[1]));
return sRect(r.x+al, r.y+au, r.w-(al+ar), r.h-(au+ab));
}
示例12: while
void wxTextPrintout::NextTab(float *x, int /* tabcount */)
{
float tab=0.0f;
while (tab<*x)
{
tab+=GetTabSize()*GetScale();
}
// return the new Value
*x=tab;
}
示例13: GetScale
Box2D GUITexture::GetBounds(void) const
{
Vector2f dims = GetScale();
if (tex != 0)
{
if (rotation == 0.0f)
{
dims = ToV2f(Vector2u(tex->GetWidth(), tex->GetHeight()));
dims.MultiplyComponents(GetScale());
}
else
{
float diameter = 2.0f * ToV2f(Vector2u(tex->GetWidth(), tex->GetHeight())).Length();
dims = Vector2f(diameter, diameter);
}
}
return Box2D(Vector2f(), dims);
}
示例14: GetRotation
//get the inverse transform matrix
mat4f PhysicsComponent::GetInverse()
{
mat4f trans;
vec3f rot = GetRotation();
vec3f pos = GetPosition();
pos.x *= -1;
mat4f::Inverse(pos * Config::s_PPM, rot.x, rot.y, rot.z, GetScale(), &trans);
return trans;
}
示例15: GetScale
void Animation::DrawAnimation(const Point2D& position)
{
Point2D sCenter = position + scalingCenter - offset;
Point2D rCenter = position + rotationCenter - offset;
sprite->DrawSprite(bounds, position - offset, sCenter, rCenter, GetScale(), GetRotation(), ColorARGB(GetOpacity(), color.GetR(), color.GetG(), color.GetB()));
SetFloatValue(ANIM_VAR_SCALE, 0);
SetFloatValue(ANIM_VAR_OPACITY, 0);
SetFloatValue(ANIM_VAR_ROTATION, 0);
}