Esempio n. 1
0
void SceneGraph::zoomAllViewpoint() 
{
	float	bboxCenter[3];
	float	bboxSize[3];

	getBoundingBoxCenter(bboxCenter);
	getBoundingBoxSize(bboxSize);

	ViewpointNode *view = getViewpointNode();
	if (view == NULL)
		view = getDefaultViewpointNode();

	float fov = view->getFieldOfView();
	float zoffset = bboxSize[0] / (float)tan(fov);
	view->setPosition(bboxCenter[0], bboxCenter[1], bboxCenter[2] + zoffset*5.0f);
	view->setOrientation(0.0f, 0.0f, 1.0f, 0.0f);
}
Esempio n. 2
0
XnBoundingBox3D Cylinder::getBoundingBox() {
    return calcBoundingBox(getCenter(), getBoundingBoxSize());
}
Esempio n. 3
0
XnBoundingBox3D RectPrism::getBoundingBox() {
    return calcBoundingBox(getCenter(), getBoundingBoxSize());
}