コード例 #1
0
void FixedFunctions::Reset()
{
	ResetRenderStates();
	SetColor();
	ResetTransformStates();
	ResetTextureStageStates();
	ResetMaterialStates();
	ResetLights();
	SetClipPlaneEnabled();
	SetClipPlane();
	SetVertexBuffer();
}
コード例 #2
0
bool FixedFunctions::SetClipPlane(char nIndex, float fA, float fB, float fC, float fD)
{
	// Set all available clip planes to this setting?
	if (nIndex < 0) {
		for (uint8 i=0; i<m_sCapabilities.nMaxClipPlanes; i++)
			SetClipPlane(i, fA, fB, fC, fD);
	} else {
		// Check whether the index and the device is valid
		if (nIndex >= static_cast<int>(m_sCapabilities.nMaxClipPlanes))
			return false; // Error!
	}

	// Done
	return true;
}
コード例 #3
0
ファイル: PD_2DXYPS.cpp プロジェクト: jjayne/nSIGHTS
void  PD_2DXYPS::SetClipPlanes()
{
    SetAxesLocals();

    double planeEqn[4];

    planeEqn[1] = 0.0;
    planeEqn[2] = 0.0;
    //  left X
    if (convXaxisMin < convXaxisMax)
    {
        planeEqn[0] = 1.0;
        planeEqn[3] = -convXaxisMin;
    }
    else
    {
        planeEqn[0] = -1.0;
        planeEqn[3] = convXaxisMin;
    }
    SetClipPlane(0, planeEqn);

    //  right X
    if (convXaxisMin < convXaxisMax)
    {
        planeEqn[0] = -1.0;
        planeEqn[3] = convXaxisMax;
    }
    else
    {
        planeEqn[0] = 1.0;
        planeEqn[3] = -convXaxisMax;
    }
    SetClipPlane(1, planeEqn);

    planeEqn[0] = 0.0;

    // bottom
    if (convYaxisMin < convYaxisMax)
    {
        planeEqn[1] = 1.0;
        planeEqn[3] = -convYaxisMin;
    }
    else
    {
        planeEqn[1] = -1.0;
        planeEqn[3] = convYaxisMin;
    }
    SetClipPlane(2, planeEqn);

    // top
    if (convYaxisMin < convYaxisMax)
    {
        planeEqn[1] = -1.0;
        planeEqn[3] = convYaxisMax;
    }
    else
    {
        planeEqn[1] = 1.0;
        planeEqn[3] = -convYaxisMax;
    }
    SetClipPlane(3, planeEqn);
}
コード例 #4
0
ファイル: Camera.cpp プロジェクト: Boshin/Urho3D
void Camera::SetClipPlaneAttr(const Vector4& value)
{
    SetClipPlane(Plane(value));
}
コード例 #5
0
ファイル: Camera.cpp プロジェクト: gameogre/Urho3D
void Camera::SetClipPlaneAttr(Vector4 value)
{
    SetClipPlane(Plane(value));
}