Exemplo n.º 1
0
void FixedFunctions::Reset()
{
	ResetRenderStates();
	SetColor();
	ResetTransformStates();
	ResetTextureStageStates();
	ResetMaterialStates();
	ResetLights();
	SetClipPlaneEnabled();
	SetClipPlane();
	SetVertexBuffer();
}
Exemplo n.º 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;
}
Exemplo n.º 3
0
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);
}
Exemplo n.º 4
0
void Camera::SetClipPlaneAttr(const Vector4& value)
{
    SetClipPlane(Plane(value));
}
Exemplo n.º 5
0
void Camera::SetClipPlaneAttr(Vector4 value)
{
    SetClipPlane(Plane(value));
}