本文整理汇总了C++中UpdateMatrix函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateMatrix函数的具体用法?C++ UpdateMatrix怎么用?C++ UpdateMatrix使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UpdateMatrix函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReloadEffects
///SS5の場合 SsPartのarrayIndexは、親子順(子は親より先にいない)と
///なっているためそのまま木構造を作らずUpdateを行う
void FSsAnimeDecoder::Update()
{
int32 time = (int32)NowPlatTime;
if(EffectUntreatedDeltaTime < 0.f)
{
ReloadEffects();
EffectUntreatedDeltaTime = NowPlatTime;
}
int32 EffectUpdateTimes = (int32)EffectUntreatedDeltaTime;
int32 EffectBaseTime = time - EffectUpdateTimes + 1;
for(int i = 0; i < PartAnime.Num(); ++i)
{
FSsPart* part = PartAnime[i].Key;
FSsPartAnime* anime = PartAnime[i].Value;
if((part->Type == SsPartType::Effect) && (PartState[i].RefEffect))
{
// エフェクトは1フレーム単位でしか更新しない
// (1フレーム == 0.5フレームずつ2回更新)
if(0 == EffectUpdateTimes)
{
UpdateState(time, part, anime, &PartState[i]);
UpdateMatrix(part, anime, &PartState[i]);
PartState[i].RefEffect->Update(0.f);
}
else
{
for (int32 j = 0; j < (EffectUpdateTimes*2); ++j)
{
UpdateState(EffectBaseTime + j, part, anime, &PartState[i]);
UpdateMatrix(part, anime, &PartState[i]);
PartState[i].RefEffect->Update(
PartState[i].RefEffect->GetFirstUpdated() ? .5f : 0.f
);
}
}
}
else
{
UpdateState(time, part, anime, &PartState[i]);
UpdateMatrix(part, anime, &PartState[i]);
if (part->Type == SsPartType::Instance)
{
UpdateInstance(time, part, anime, &PartState[i]);
UpdateVertices(part, anime, &PartState[i]);
}
}
}
EffectUntreatedDeltaTime -= EffectUpdateTimes;
SortList.Sort();
}
示例2: UpdateMatrix
void Entity::SetScale(Vector3f p)
{
scale.x = p.x;
scale.y = p.y;
scale.z = p.z;
UpdateMatrix(false,false,true);
}
示例3: UpdateMaxScaleFactor
void RSBase3D::SetScale(float x,float y,float z)
{
ScaleFactorX=x;ScaleFactorY=y;ScaleFactorZ=z;
MaxScaleFactor=1.0f;
UpdateMaxScaleFactor();
UpdateMatrix();
}
示例4: UpdateMatrix
/***********************************************************
set object position in the world
***********************************************************/
void OsgObjectHandler::SetPosition(float X, float Y, float Z)
{
_posX = X;
_posY = Y;
_posZ = Z;
UpdateMatrix();
}
示例5: core
BOOL CDerMatrDlg::OnInitDialog()
{
CDialog::OnInitDialog();
////preparing table
m_mtr.InsertColumn(0,"»ндексы",LVCFMT_LEFT,60);
m_mtr.InsertColumn(1,"1",LVCFMT_LEFT,141);
m_mtr.InsertColumn(2,"2",LVCFMT_LEFT,141);
m_mtr.InsertColumn(3,"3",LVCFMT_LEFT,142);
m_mtr.InsertColumn(4,"4",LVCFMT_LEFT,142);
////
SRParamsTable* pPT = core().rParamsTable();
for (int l=1;l<core().link_count();l++)
m_link_c.AddString(core().link(l).Name.c_str());
for (Size v = 0; v < pPT->pVs.size(); ++ v)
m_coord_c.AddString(pPT->pVs[v].var.GetName().c_str());
m_link_c.SetCurSel(core().link_count() - 2);
m_coord_c.SetCurSel(0);
UpdateMatrix(m_link_c.GetCurSel() + 1, m_coord_c.GetCurSel() + 1);
UpdateData(false);
return TRUE;
}
示例6: UpdateMatrix
void CMMDObject::DrawShape(void)
{
if(isHandling) {
UpdateMatrix();
g_clPMDModel.updateSkinning2();
}
glDisable(GL_COLOR_MATERIAL);
glEnable(GL_CULL_FACE);
glCullFace(GL_FRONT);
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GEQUAL, 0.05f);
g_clPMDModel.render();
glDisable(GL_ALPHA_TEST);
glDisable(GL_CULL_FACE);
glEnable(GL_COLOR_MATERIAL);
glDisable(GL_TEXTURE_2D);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
CFrame::DrawShape();
}
示例7: SetVelocity
void Rigidbody::Update(float dt)
{
//////////linearvelocity update
Vector3h vec = Velocity + acc*dt;
SetVelocity(vec);
pos =pos + Velocity*dt;
///////rotation update
Quath vel(0,AngVelocity.x,AngVelocity.y,AngVelocity.z);
vel = vel*rotation;
vel*=0.5*dt;
rotation += vel;
rotation.Normalize();
////////////////////
float damping=0.8;
damping = powf(damping,dt);
Velocity *= damping;
AngVelocity*= damping;
UpdateMatrix();
}
示例8: UpdateMatrix
void CRain::Render( LPDIRECT3DDEVICE9 pd3dDevice )
{
if( !IsVisible() || ( IsCull() && GetType() != 1 ))
return;
if( IsUpdateMatrix() )
UpdateMatrix();
if(GetPos().y >= 0)
{
pd3dDevice->SetTransform( D3DTS_WORLD, &m_matWorld );
pd3dDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_MODULATE );
pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 );
pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );
pd3dDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE);
pd3dDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_DESTALPHA );
pd3dDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_SRCALPHA );
m_pModel->Render(pd3dDevice);
pd3dDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW );
pd3dDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE );
}
}
示例9: UpdateMatrix
void GameEntity::Draw(glm::mat4 viewMatrix, glm::mat4 projMatrix, glm::vec3 light)
{
UpdateMatrix(position, rotation, scale);
// Draw the object using the given view (which contains the camera orientation) and projection (which contains information about the camera 'lense')
Object->Draw(viewMatrix, projMatrix, light);
}
示例10: _posX
/***********************************************************
default constructor
***********************************************************/
OsgObjectHandler::OsgObjectHandler(int sceneidx, boost::shared_ptr<DisplayTransformation> Tr,
const LbaNet::ObjectExtraInfo &extrainfo,
const LbaNet::LifeManaInfo &lifeinfo,
osg::ref_ptr<osg::Node> particle)
: _posX(0), _posY(0), _posZ(0), _displayed(true), _extrainfo(extrainfo), _uselight(true),
_lifeinfo(lifeinfo), _useTransparentMaterial(false), _MaterialType(0), _sceneidx(sceneidx),
_particle(particle)
{
#ifdef _DEBUG
LogHandler::getInstance()->LogToFile("Created empty Osg object.");
#endif
_OsgObject = OsgHandler::getInstance()->AddEmptyActorNode(_sceneidx, true);
_OsgObjectNoLight = OsgHandler::getInstance()->AddEmptyActorNode(_sceneidx,false);
if(Tr)
{
_osgpat = OsgHandler::getInstance()->CreatePAT(Tr);
_OsgObject->addChild(_osgpat);
_osgpatNoLight = OsgHandler::getInstance()->CreatePAT(Tr);
_OsgObjectNoLight->addChild(_osgpatNoLight);
}
UpdateMatrix();
RefreshText();
}
示例11: position
/**
****************************************************************************************************
@brief Move camera to new position(absolute)
@param wx new X-coordinate
@param wy new Y-coordinate
@param wz new Z-coordinate
@return new transformation matrix
****************************************************************************************************/
glm::mat4& TCamera::MoveAbs(GLfloat wx, GLfloat wy, GLfloat wz)
{
m_pos.x = wx;
m_pos.y = wy;
m_pos.z = wz;
UpdateMatrix();
return m_viewMatrix;
}
示例12: UpdateMatrix
/**
****************************************************************************************************
@brief Look camera at target.
@param wx target X-coordinate
@param wy target Y-coordinate
@param wz target Z-coordinate
@return new transformation matrix
****************************************************************************************************/
glm::mat4& TCamera::LookAt(GLfloat wx, GLfloat wy, GLfloat wz)
{
m_look.x = wx;
m_look.y = wy;
m_look.z = wz;
UpdateMatrix();
return m_viewMatrix;
}
示例13: UpdateMatrix
void TMD5Renderer::SetProjection(float fovy, float aspect, float near, float far)
{
nearPlane = near;
farPlane = far;
projectionMatrix = Matrix4::MakeProjectionMatrix(fovy, aspect, near, far);
UpdateMatrix();
}
示例14: UpdateMatrix
void Entity_base::CheckUpdate()
{
if(queueUpdateMatrix)
{
UpdateMatrix();
queueUpdateMatrix = false;
}
}
示例15: SetUp
CCamera::CCamera(void)
{
m_LiftAngle = 0.0f;
SetUp(0, 1, 0);
SetLookat(0, 0, 0);
SetEye(1, 0, 1);
UpdateMatrix();
}