/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #if !defined( __VBOBYSCREEN_H__) #define __VBOBYSCREEN_H__ #include "mgGL/VBO.h" class MGPosition; /** @file */ /** @addtogroup DisplayHandling * @{ */ ///mgVBOByScreen is a VBO to draw pictures in screen coordinates of a constant z value. ///All of the input coordinates(except z) are treated as screen coordinates ///whose screen data is set by set_viewport. The origin is (x,y) and the size is ///(width, height). Here (x,y,width,height) are the values ///set by set_viewport(). ///All of the coordinates are converted to the normalized device coordinate(NDC) ///whose range is(-1,-1) to (1,1). Only z value given by the constructor or se_ZValue ///is the NDC. class MG_DLL_DECLR mgVBOByScreen:public mgVBO{ public: ///construct given z(in NDC). mgVBOByScreen(float z=-1.f):m_z(z){m_coordinateType = mgGLSL::NdcScreen;}; ///Convert screen coordinates to normalized world coordinates. void convert2NormalizedWorld( const int xyS[2], ///