Panda3D
Public Member Functions | Static Public Member Functions | List of all members
MeshDrawer2D Class Reference

This class allows the drawing of 2d objects - mainly based on quads and rectangles. More...

Inheritance diagram for MeshDrawer2D:
TypedObject

Public Member Functions

 __init__ ()
 Creates the MeshDrawer2D low level system. More...
 
 begin ()
 Opens up the geom for drawing, don't forget to call MeshDrawer2D::end() More...
 
 end ()
 Finish the drawing and clearing off the remaining vertexes. More...
 
int getBudget ()
 Gets the total triangle budget of the drawer. More...
 
NodePath getRoot ()
 Returns the root NodePath. More...
 
 quadRaw (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. More...
 
 rectangle (float x, float y, float w, float h, float u, float v, float us, float vs, const LVector4 color)
 Draws a 2d rectangle, that can be cliped. More...
 
 rectangleBorder (float x, float y, float w, float h, float r, float t, float l, float b, float tr, float tt, float tl, float tb, float u, float v, float us, float vs, const LVector4 color)
 Draws a 2d rectangle, with borders and corders, taken from the surrounding texture. More...
 
 rectangleBorderTiled (float x, float y, float w, float h, float r, float t, float l, float b, float tr, float tt, float tl, float tb, float u, float v, float us, float vs, const LVector4 color)
 Draws a 2d rectangle, with borders and corders, taken from the surrounding texture. More...
 
 rectangleRaw (float x, float y, float w, float h, float u, float v, float us, float vs, const LVector4 color)
 
 rectangleTiled (float x, float y, float w, float h, float u, float v, float us, float vs, const LVector4 color)
 Draws a tiled rectangle, size of tiles is in us and vs. More...
 
 setBudget (int budget)
 Sets the total triangle budget of the drawer. More...
 
 setClip (float x, float y, float w, float h)
 Sets clipping rectangle. More...
 
- Public Member Functions inherited from TypedObject
TypeHandle getType ()
 
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More...
 
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly. More...
 
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type. More...
 

Static Public Member Functions

static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle getClassType ()
 

Additional Inherited Members

- Public Attributes inherited from TypedObject
TypeHandle type
 Returns the TypeHandle representing this object's type. More...
 

Detailed Description

This class allows the drawing of 2d objects - mainly based on quads and rectangles.

Allows clipping and serverl high level UI theme functions.

Member Function Documentation

◆ __init__()

__init__ ( )

Creates the MeshDrawer2D low level system.

◆ begin()

begin ( )

Opens up the geom for drawing, don't forget to call MeshDrawer2D::end()

◆ end()

end ( )

Finish the drawing and clearing off the remaining vertexes.

◆ getBudget()

int getBudget ( )

Gets the total triangle budget of the drawer.

◆ getClassType()

static TypeHandle getClassType ( )
static

◆ getRoot()

NodePath getRoot ( )

Returns the root NodePath.

◆ quadRaw()

quadRaw ( 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.

Ignores the cliping rectangle

◆ rectangle()

rectangle ( float  x,
float  y,
float  w,
float  h,
float  u,
float  v,
float  us,
float  vs,
const LVector4  color 
)

Draws a 2d rectangle, that can be cliped.

◆ rectangleBorder()

rectangleBorder ( float  x,
float  y,
float  w,
float  h,
float  r,
float  t,
float  l,
float  b,
float  tr,
float  tt,
float  tl,
float  tb,
float  u,
float  v,
float  us,
float  vs,
const LVector4  color 
)

Draws a 2d rectangle, with borders and corders, taken from the surrounding texture.

◆ rectangleBorderTiled()

rectangleBorderTiled ( float  x,
float  y,
float  w,
float  h,
float  r,
float  t,
float  l,
float  b,
float  tr,
float  tt,
float  tl,
float  tb,
float  u,
float  v,
float  us,
float  vs,
const LVector4  color 
)

Draws a 2d rectangle, with borders and corders, taken from the surrounding texture.

◆ rectangleRaw()

rectangleRaw ( float  x,
float  y,
float  w,
float  h,
float  u,
float  v,
float  us,
float  vs,
const LVector4  color 
)

◆ rectangleTiled()

rectangleTiled ( float  x,
float  y,
float  w,
float  h,
float  u,
float  v,
float  us,
float  vs,
const LVector4  color 
)

Draws a tiled rectangle, size of tiles is in us and vs.

◆ setBudget()

setBudget ( int  budget)

Sets the total triangle budget of the drawer.

◆ setClip()

setClip ( float  x,
float  y,
float  w,
float  h 
)

Sets clipping rectangle.