public LDRect(LDPoint topleft, LDSize size) { this.xp = topleft.x(); this.yp = topleft.y(); this.w = size.width(); this.h = size.height(); }
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)); } }
public void setSize(LDSize s) { this.w = s.width(); this.h = s.height(); }