Пример #1
0
void GXMRenderer::bindViewProj(const physx::PxMat44 &eye, const RendererProjection &proj)
{
	m_viewMatrix = eye.inverseRT();
	convertToSce(m_environment.mViewMatrix, m_viewMatrix);
	convertToSce(m_environment.mProjMatrix, proj);

	const PxVec3 &eyePosition  =  eye.getPosition();
	const PxVec3  eyeDirection = -eye.getBasis(2);
	memcpy(m_environment.mEyePosition,  &eyePosition.x,  sizeof(float)*3);
	memcpy(m_environment.mEyeDirection, &eyeDirection.x, sizeof(float)*3);
}
Пример #2
0
void GLES2Renderer::bindViewProj(const physx::PxMat44 &eye, const PxMat44 &proj)
{
		physx::PxMat44 inveye = eye.inverseRT();

		// load the projection matrix...
		PxToGL(m_glProjectionMatrix, proj);

		// load the view matrix...
		m_viewMatrix = inveye;

		m_eyePosition  =  eye.getPosition();
		m_eyeDirection = -eye.getBasis(2);
}