예제 #1
0
 public LDRect(LDPoint topleft, LDSize size)
 {
     this.xp = topleft.x();
     this.yp = topleft.y();
     this.w  = size.width();
     this.h  = size.height();
 }
예제 #2
0
파일: LDRect.cs 프로젝트: KajitaLD/math
 public LDRect(LDPoint topleft, LDSize size)
 {
     this.xp = topleft.x();
     this.yp = topleft.y();
     this.w = size.width();
     this.h = size.height();
 }
예제 #3
0
파일: LDUvMesh.cs 프로젝트: johndpope/math
        public void updateUvMap(LDSize ImageSize)
        {
            m_uvMap.Clear();
            for (int i = 0; i < m_points.size(); i++)
            {
                float u = m_points[i].x() / ImageSize.width();
                float v = m_points[i].y() / ImageSize.height();

                LDMathUtil.clamp(u, 0.0f, 1.0f);
                LDMathUtil.clamp(v, 0.0f, 1.0f);

                m_uvMap.Add(new LDPoint(u, v));
            }
        }
예제 #4
0
 public void setSize(LDSize s)
 {
     this.w = s.width();
     this.h = s.height();
 }
예제 #5
0
파일: LDRect.cs 프로젝트: KajitaLD/math
 public void setSize(LDSize s)
 {
     this.w = s.width();
     this.h = s.height();
 }
예제 #6
0
파일: LDUvMesh.cs 프로젝트: KajitaLD/math
        public void updateUvMap(LDSize ImageSize)
        {
            m_uvMap.Clear();
            for (int i = 0; i < m_points.size(); i++)
            {
                float u = m_points[i].x() / ImageSize.width();
                float v = m_points[i].y() / ImageSize.height();

                LDMathUtil.clamp(u, 0.0f, 1.0f);
                LDMathUtil.clamp(v, 0.0f, 1.0f);

                m_uvMap.Add(new LDPoint(u, v));
            }
        }