45 if (_vertex != NULL)
delete _vertex;
46 if (_uv != NULL)
delete _uv;
47 if (_color != NULL)
delete _color;
67 _budget = total_budget;
87 set_clip(PN_stdfloat x, PN_stdfloat y, PN_stdfloat w, PN_stdfloat h) {
107 if( _clear_index > _end_clear_index)
return;
129 INLINE
void MeshDrawer2D::
130 rectangle_raw(PN_stdfloat x, PN_stdfloat y, PN_stdfloat w, PN_stdfloat h,
131 PN_stdfloat u, PN_stdfloat v, PN_stdfloat us, PN_stdfloat vs,
149 rectangle(PN_stdfloat x, PN_stdfloat y, PN_stdfloat w, PN_stdfloat h,
150 PN_stdfloat u, PN_stdfloat v, PN_stdfloat us, PN_stdfloat vs,
154 if( w == 0 && h == 0 )
return;
155 if (x > _clip_x+_clip_w)
return;
156 if (y > _clip_y+_clip_h)
return;
157 if (x+w < _clip_x)
return;
158 if (y+h < _clip_y)
return;
162 PN_stdfloat x_uv_ratio = us/w;
163 PN_stdfloat y_uv_ratio = vs/h;
184 if (x+w > _clip_x+_clip_w){
186 dt = x+w - (_clip_x+_clip_w);
191 if (y+h > _clip_y+_clip_h){
193 dt = y+h - (_clip_y+_clip_h);
199 rectangle_raw(x,y,w,h,u,v,us,vs,color);
void set_clip(PN_stdfloat x, PN_stdfloat y, PN_stdfloat w, PN_stdfloat h)
Sets clipping rectangle.
void quad_raw(const LVector3 &v1, const LVector4 &c1, const LVector2 &uv1, const LVector3 &v2, const LVector4 &c2, const LVector2 &uv2, const LVector3 &v3, const LVector4 &c3, const LVector2 &uv3, const LVector3 &v4, const LVector4 &c4, const LVector2 &uv4)
Draws a 2d rectangle.
~MeshDrawer2D()
Destroys the MeshDrawer2D low level system.
void add_data2(PN_stdfloat x, PN_stdfloat y)
Sets the write row to a particular 2-component value, and advances the write row. ...
void rectangle(PN_stdfloat x, PN_stdfloat y, PN_stdfloat w, PN_stdfloat h, PN_stdfloat u, PN_stdfloat v, PN_stdfloat us, PN_stdfloat vs, const LVector4 &color)
Draws a 2d rectangle, that can be cliped.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
NodePath get_root()
Returns the root NodePath.
void add_data4(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat w)
Sets the write row to a particular 4-component value, and advances the write row. ...
void add_data3(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
Sets the write row to a particular 3-component value, and advances the write row. ...
This is a four-component vector distance.
int get_budget()
Gets the total triangle budget of the drawer.
This is a two-component vector offset.
void set_budget(int budget)
Sets the total triangle budget of the drawer.
void remove_node(Thread *current_thread=Thread::get_current_thread())
Disconnects the referenced node from the scene graph.
MeshDrawer2D()
Creates the MeshDrawer2D low level system.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...