Example #1
0
void Clipper::update() {
	Vector3 planepts[3];
	if (!valid()) {
		planepts[0] = Vector3(0, 0, 0);
		planepts[1] = Vector3(0, 0, 0);
		planepts[2] = Vector3(0, 0, 0);
		setClipPlane(Plane3(0, 0, 0, 0));
	}
	else {
		AABB bounds(Vector3(0, 0, 0), Vector3(64, 64, 64));
		getPlanePoints(planepts, bounds);
		if (_switch) {
			std::swap(planepts[0], planepts[1]);
		}
		setClipPlane(Plane3(planepts));
	}
	GlobalMainFrame().updateAllWindows();
}
Example #2
0
 //-----------------------------------------------------------------------
 void RenderSystem::setClipPlane (ushort index, const Plane &p)
 {
     setClipPlane (index, p.normal.x, p.normal.y, p.normal.z, p.d);
 }