Ejemplo n.º 1
0
void CModelDecal::SetTransform(const CMatrix3D& transform)
{
	// Since decals are assumed to be horizontal and projected downwards
	// onto the terrain, use just the Y-axis rotation and the translation
	CMatrix3D newTransform;
	newTransform.SetYRotation(transform.GetYRotation() + m_Decal.m_Angle);
	newTransform.Translate(transform.GetTranslation());

	CRenderableObject::SetTransform(newTransform);
	InvalidatePosition();
}
Ejemplo n.º 2
0
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Update: update this model to the given time, in msec
void CModel::UpdateTo(float time)
{
	// update animation time, but don't calculate bone matrices - do that (lazily) when
	// something requests them; that saves some calculation work for offscreen models,
	// and also assures the world space, inverted bone matrices (required for normal
	// skinning) are up to date with respect to m_Transform
	m_AnimTime = time;

	// mark vertices as dirty
	SetDirty(RENDERDATA_UPDATE_VERTICES);

	// mark matrices as dirty
	InvalidatePosition();
}
Ejemplo n.º 3
0
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SetTransform: set the transform on this object, and reorientate props accordingly
void CModel::SetTransform(const CMatrix3D& transform)
{
	// call base class to set transform on this object
	CRenderableObject::SetTransform(transform);
	InvalidatePosition();
}