Exemplo n.º 1
0
 public LDRect(LDPoint topleft, LDSize size)
 {
     this.xp = topleft.x();
     this.yp = topleft.y();
     this.w  = size.width();
     this.h  = size.height();
 }
Exemplo n.º 2
0
 public LDRect(LDPoint topleft, LDSize size)
 {
     this.xp = topleft.x();
     this.yp = topleft.y();
     this.w = size.width();
     this.h = size.height();
 }
Exemplo n.º 3
0
        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));
            }
        }
Exemplo n.º 4
0
 public void setSize(LDSize s)
 {
     this.w = s.width();
     this.h = s.height();
 }
Exemplo n.º 5
0
 public void setSize(LDSize s)
 {
     this.w = s.width();
     this.h = s.height();
 }
Exemplo n.º 6
0
        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));
            }
        }