Exemplo n.º 1
0
void QToolAlign::render()
{
	mBBox = get_selection_axis_aligned_bbox();

	// Draw bounding box
	LLGLSUIDefault gls_ui;
	LLGLEnable gl_blend(GL_BLEND);
	LLGLEnable gls_alpha_test(GL_ALPHA_TEST);
	LLGLDepthTest gls_depth(GL_FALSE);
	gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);

	// render box
	LLColor4 default_normal_color( 0.7f, 0.7f, 0.7f, 0.1f );
	gGL.color4fv( default_normal_color.mV );

	LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getEditSelection();
 	BOOL can_move = selection->getObjectCount() != 0;
	if (can_move)
 	{
		struct f : public LLSelectedObjectFunctor
 		{
 			virtual bool apply(LLViewerObject* objectp)
 			{
 				return objectp->permMove() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
			}
		} func;
		can_move = selection->applyToObjects(&func);
	}
	if (can_move)
	{
		render_bbox(mBBox);
		renderManipulators();
	}
}
Exemplo n.º 2
0
void QToolAlign::render()
{
	mBBox = get_selection_axis_aligned_bbox();

	// Draw bounding box
	LLGLSUIDefault gls_ui;
	LLGLEnable gl_blend(GL_BLEND);
	LLGLEnable gls_alpha_test(GL_ALPHA_TEST);
	LLGLDepthTest gls_depth(GL_FALSE);
	gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);

	// render box
	LLColor4 default_normal_color( 0.7f, 0.7f, 0.7f, 0.1f );
	gGL.color4fv( default_normal_color.mV );

	render_bbox(mBBox);
	renderManipulators();
}