Example #1
0
void Noun::preRender( RenderContext & context,
		const Matrix33 & frame,
		const Vector3 & position )
{
#if ENABLE_VISIBILITY_CHECK
	bool bAmbient = (m_nNodeFlags & BaseNode::NF_AMBIENT) != 0;

	// NOTE: We use the worldHull() function, because it will calculate the world hull if needed..
#if USE_SPHERE_VISIBLE
	if ( bAmbient || context.sphereVisible( context.worldToView( worldHull().center() ), worldHull().radius() ) )
		NodeTransform::preRender( context, frame, position );
#else
	if ( bAmbient || context.boxVisible( context.worldToView( worldHull() ) ) )
		NodeTransform::preRender( context, frame, position );
#endif
#else
	NodeTransform::preRender( context, frame, position );
#endif
}