//JAM 06Jan04
void BSubTree::Draw(void)
{
	BNode *child;

	TheStateStack.pCoords=pCoords;					// SAVES POOLS
	TheStateStack.pNormals=pNormals;				// SAVES POOLS

	if(SubTreeCount) NodeCount++;									// Node Counter;
	SubTreeCount=true;
	
	CV->AddShaderNormals(nNormals);

/*	TheStateStack.Light(pNormals,nNormals,pCoords); //- COBRA - RED - Call only if Normals available

	if(nDynamicCoords == 0)
		TheStateStack.Transform(pCoords,nCoords);
	else
	{
		TheStateStack.Transform(pCoords,nCoords-nDynamicCoords);
		TheStateStack.Transform(TheStateStack.CurrentInstance->DynamicCoords+DynamicCoordOffset,nDynamicCoords);
	}*/

	child = subTree;
//	ShiAssert(FALSE == F4IsBadReadPtr( child, sizeof*child) );

	do
	{
		child->Draw();
		child = child->sibling;
	}
	while(child); // JB 010306 CTD
}
void BSplitterNode::Draw(void)
{
	BNode	*child;

	ShiAssert( front );
	ShiAssert( back );
	NodeCount++;									// Node Counter;

/*	if (A*TheStateStack.ObjSpaceEye.x + 
		B*TheStateStack.ObjSpaceEye.y + 
		C*TheStateStack.ObjSpaceEye.z + D > 0.0f) {
*/
	if((int)front!=-1){
		child = front;
		do
		{
			child->Draw();
			child = child->sibling;
		} while (child);
	}

	if((int)back!=-1){
		child = back;
		do
		{
			child->Draw();
			child = child->sibling;
		} while (child);
	}
/*	}
	else
	{
		child = back;
		do
		{
			child->Draw();
			child = child->sibling;
		} while (child);

		child = front;
		do
		{
			child->Draw();
			child = child->sibling;
		} while (child);
	}*/
}
Example #3
0
void BSplitterNode::Draw(void)
{
    BNode	*child;

    ShiAssert( front );
    ShiAssert( back );

    if (A*TheStateStack.ObjSpaceEye.x +
            B*TheStateStack.ObjSpaceEye.y +
            C*TheStateStack.ObjSpaceEye.z + D > 0.0f) {

        child = front;
        do
        {
            child->Draw();
            child = child->sibling;
        } while (child);

        child = back;
        do
        {
            child->Draw();
            child = child->sibling;
        } while (child);
    }
    else
    {
        child = back;
        do
        {
            child->Draw();
            child = child->sibling;
        } while (child);

        child = front;
        do
        {
            child->Draw();
            child = child->sibling;
        } while (child);
    }
}
Example #4
0
//JAM 06Jan04
void BSubTree::Draw(void)
{
    BNode *child;

    if(nNormals) TheStateStack.Light(pNormals,nNormals,pCoords); //- COBRA - RED - Call only if Normals available

    if(nDynamicCoords == 0)
        TheStateStack.Transform(pCoords,nCoords);
    else
    {
        TheStateStack.Transform(pCoords,nCoords-nDynamicCoords);
        TheStateStack.Transform(TheStateStack.CurrentInstance->DynamicCoords+DynamicCoordOffset,nDynamicCoords);
    }

    child = subTree;
    ShiAssert(FALSE == F4IsBadReadPtr( child, sizeof*child) );

    do
    {
        child->Draw();
        child = child->sibling;
    }
    while(child); // JB 010306 CTD
}