data/test/cpp/274714280ce25f9132120dbf60c2bd06946c2eacClippingPlaneLocator.cpp
ClippingPlaneLocator::ClippingPlaneLocator(Vrui::LocatorTool * locatorTool,
		GeometryViewer* _geometryViewer) :
	BaseLocator(locatorTool, _geometryViewer), clippingPlane(0) {
	/* Find a clipping plane index for this locator: */
	ClippingPlane * clippingPlanes = _geometryViewer->getClippingPlanes();
	for (int i=0; i<_geometryViewer->getNumberOfClippingPlanes(); ++i)
		if (!clippingPlanes[i].isAllocated()) {
			clippingPlane=&clippingPlanes[i];
			break;
		}

	/* Allocate the clipping plane: */
	if (clippingPlane!=0) {
		clippingPlane->setActive(false);
		clippingPlane->setAllocated(true);
	}
}
/*
 * ClippingPlaneLocator - Constructor for ClippingPlaneLocator class.
 *
 * parameter locatorTool - Vrui::LocatorTool *
 * parameter _geometryViewer - GeometryViewer *
 */
Constructor for ClippingPlaneLocator class.
parameter locatorTool - Vrui::LocatorTool
parameter _geometryViewer - GeometryViewer
Constructor for ClippingPlaneLocator class . parameter locatorTool - Vrui :: LocatorTool parameter _geometryViewer - GeometryViewer
ClippingPlaneLocator::ClippingPlaneLocator(Vrui::LocatorTool * locatorTool,
		GeometryViewer* _geometryViewer) :
	BaseLocator(locatorTool, _geometryViewer), clippingPlane(0) {
	ClippingPlane * clippingPlanes = _geometryViewer->getClippingPlanes();
	for (int i=0; i<_geometryViewer->getNumberOfClippingPlanes(); ++i)
		if (!clippingPlanes[i].isAllocated()) {
			clippingPlane=&clippingPlanes[i];
			break;
		}
	if (clippingPlane!=0) {
		clippingPlane->setActive(false);
		clippingPlane->setAllocated(true);
	}
}
ClippingPlaneLocator :: ClippingPlaneLocator ( Vrui :: LocatorTool * locatorTool , GeometryViewer * _geometryViewer ) : BaseLocator ( locatorTool , _geometryViewer ) , clippingPlane ( 0 ) { ClippingPlane * clippingPlanes = _geometryViewer -> getClippingPlanes ( ) ; for ( int i = 0 ; i < _geometryViewer -> getNumberOfClippingPlanes ( ) ; ++ i ) if ( ! clippingPlanes [ i ] . isAllocated ( ) ) { clippingPlane = & clippingPlanes [ i ] ; break ; } if ( clippingPlane != 0 ) { clippingPlane -> setActive ( false ) ; clippingPlane -> setAllocated ( true ) ; } }
ClippingPlaneLocator - Constructor for ClippingPlaneLocator class.
ClippingPlaneLocator - Constructor for ClippingPlaneLocator class .
/* Find a clipping plane index for this locator: */ /* Allocate the clipping plane: */