コード例 #1
0
/**
    \fn configure
*/
bool removePlaneFilter::configure(void)
{
  
  diaElemToggle planeY(&(config.keepY),QT_TRANSLATE_NOOP("removeplane","Keep Y Plane"),QT_TRANSLATE_NOOP("removeplane","Process luma plane"));
  diaElemToggle planeU(&(config.keepU),QT_TRANSLATE_NOOP("removeplane","Keep U Plane"),QT_TRANSLATE_NOOP("removeplane","Process chromaU plane"));
  diaElemToggle planeV(&(config.keepV),QT_TRANSLATE_NOOP("removeplane","Keep V Plane"),QT_TRANSLATE_NOOP("removeplane","Process chromaV plane"));
  
  
  diaElem *elems[3]={&planeY,&planeU,&planeV};
  
  return diaFactoryRun(QT_TRANSLATE_NOOP("removeplane","Remove plane"),3,elems);
}
コード例 #2
0
ファイル: Main.cpp プロジェクト: reinebold/cs580CMS
void unitTest() {
	std::cout << "testing plane-face intersection" << std::endl;

	Vertex planeV(0,0,0);
	Vector planeN(0, 0, -1);
	Plane p(planeV, planeN);

	Vertex** vertexArray = new Vertex*[4];
	Vertex* v1 = new Vertex(0, 0, 0);
	Vertex* v2 = new Vertex(50, 0, 0);
	Vertex* v3 = new Vertex(50, 50, 0);
	Vertex* v4 = new Vertex(0, 50, 0);
	vertexArray[0] = v1;
	vertexArray[1] = v2;
	vertexArray[2] = v3;
	vertexArray[3] = v4;

	Face f(4, vertexArray);
	f.updateFaces();

	Edge* answer = Geometry::planeFaceIntersection(p, f);
	
	if (answer == NULL) {
		std::cout << "edge was null" << std::endl;
	} else {
		std::cout << "edge was:" << std::endl;
		std::cout << answer->begin->val[X] << "," << answer->begin->val[Y] << "," << answer->begin->val[Z] << std::endl;
		std::cout << answer->end->val[X] << "," << answer->end->val[Y] << "," << answer->end->val[Z] << std::endl;
	}
	std::cout << "testing createFace " << std::endl;


	Edge* e1 = new Edge(v1, v2);
	Edge* e2 = new Edge(v2, v3);
	Edge* e3 = new Edge(v3, v4);
	Edge* e4 = new Edge(v4, v1);

	Edge** edges = new Edge*[4];
	edges[0] = e1;
	edges[1] = e2;
	edges[2] = e3;
	edges[3] = e4;
    int numnumEdges = 4;

	Face* createdFace = Geometry::createFace(edges,numnumEdges);

	std::cout << "end of testing" << std::endl;

}