vertex.monkey2 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. Namespace mojo.graphics
  2. #rem monkeydoc @hidden
  3. #end
  4. Struct Vertex2f
  5. Field x:Float,y:Float 'mx2_Vertex
  6. Field s0:Float,t0:Float 'mx2_TexCoord0
  7. Field ix:Float,iy:Float 'mx2_Tangent
  8. Field color:UInt 'mx2_Color
  9. Method New()
  10. End
  11. Method New( position:Vec2f,texCoord0:Vec2f=New Vec2f,tangent:Vec2f=New Vec2f,colorARGB:UInt=$ffffffff )
  12. Position=position
  13. TexCoord0=texCoord0
  14. Tangent=tangent
  15. ColorARGB=colorARGB
  16. End
  17. Method New( x:Float,y:Float,s0:Float=0,t0:Float=0,ix:Float=0,iy:Float=0,colorARGB:UInt=$ffffffff )
  18. Self.x=x;Self.y=y
  19. Self.s0=s0;Self.t0=t0
  20. Self.ix=ix;Self.iy=iy
  21. Self.color=colorARGB
  22. End
  23. Property Position:Vec2f()
  24. Return New Vec2f( x,y )
  25. Setter( position:Vec2f )
  26. x=position.x
  27. y=position.y
  28. End
  29. Property TexCoord0:Vec2f()
  30. Return New Vec2f( s0,t0 )
  31. Setter( texCoord0:Vec2f )
  32. s0=texCoord0.x
  33. t0=texCoord0.y
  34. End
  35. Property Tangent:Vec2f()
  36. Return New Vec2f( ix,iy )
  37. Setter( tangent:Vec2f )
  38. ix=tangent.x
  39. iy=tangent.y
  40. End
  41. Property ColorARGB:UInt()
  42. Return color
  43. Setter( colorARGB:UInt )
  44. color=colorARGB
  45. End
  46. End