Panda3D
Public Member Functions | Static Public Member Functions

MeshDrawer2D Class Reference

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

Inheritance diagram for MeshDrawer2D:
TypedObject MemoryBase

List of all members.

Public Member Functions

 MeshDrawer2D ()
 Creates the MeshDrawer2D low level system.
 begin ()
 Opens up the geom for drawing, dont forget to call MeshDrawer2D.end()
 end ()
 Finish the drawing and clearing off the remaining vertexes.
int getBudget ()
 Gets the total triangle budget of the drawer.
NodePath getRoot ()
 Returns the root NodePath.
TypeHandle getType ()
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly.
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type.
 quadRaw (Vec3 v1, Vec4 c1, Vec2 uv1, Vec3 v2, Vec4 c2, Vec2 uv2, Vec3 v3, Vec4 c3, Vec2 uv3, Vec3 v4, Vec4 c4, Vec2 uv4)
 Draws a 2d rectangle.
 rectangle (float x, float y, float w, float h, float u, float v, float us, float vs, Vec4 color)
 Draws a 2d rectangle, that can be cliped.
 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, Vec4 color)
 Draws a 2d rectangle, with borders and corders, taken from the surrounding texture.
 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, Vec4 color)
 Draws a 2d rectangle, with borders and corders, taken from the surrounding texture.
 rectangleRaw (float x, float y, float w, float h, float u, float v, float us, float vs, Vec4 color)
 rectangleTiled (float x, float y, float w, float h, float u, float v, float us, float vs, Vec4 color)
 Draws a tiled rectangle, size of tiles is in us and vs.
 setBudget (int budget)
 Sets the total triangle budget of the drawer.
 setClip (float x, float y, float w, float h)
 Sets clipping rectangle.

Static Public Member Functions

static TypeHandle getClassType ()

Detailed Description

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

Alows clipping and serverl high level UI theme functions.


Constructor & Destructor Documentation

Creates the MeshDrawer2D low level system.


Member Function Documentation

begin ( )

Opens up the geom for drawing, dont forget to call MeshDrawer2D.end()

end ( )

Finish the drawing and clearing off the remaining vertexes.

int getBudget ( )

Gets the total triangle budget of the drawer.

static TypeHandle getClassType ( ) [static]

Reimplemented from TypedObject.

NodePath getRoot ( )

Returns the root NodePath.

TypeHandle getType ( ) [inherited]

Reimplemented in AnimChannelBase.

int getTypeIndex ( ) [inherited]

Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

This is equivalent to get_type().get_index().

bool isExactType ( TypeHandle  handle) [inherited]

Returns true if the current object is the indicated type exactly.

bool isOfType ( TypeHandle  handle) [inherited]

Returns true if the current object is or derives from the indicated type.

quadRaw ( Vec3  v1,
Vec4  c1,
Vec2  uv1,
Vec3  v2,
Vec4  c2,
Vec2  uv2,
Vec3  v3,
Vec4  c3,
Vec2  uv3,
Vec3  v4,
Vec4  c4,
Vec2  uv4 
)

Draws a 2d rectangle.

Ignores the cliping rectangle

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

Draws a 2d rectangle, that can be cliped.

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,
Vec4  color 
)

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

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,
Vec4  color 
)

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

rectangleRaw ( float  x,
float  y,
float  w,
float  h,
float  u,
float  v,
float  us,
float  vs,
Vec4  color 
)
rectangleTiled ( float  x,
float  y,
float  w,
float  h,
float  u,
float  v,
float  us,
float  vs,
Vec4  color 
)

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

setBudget ( int  budget)

Sets the total triangle budget of the drawer.

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

Sets clipping rectangle.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties