Panda3D
Loading...
Searching...
No Matches
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...

#include <pandadoc.hpp>

Inheritance diagram for MeshDrawer2D:
TypedObject

Public Member Functions

 __init__ ()
 Creates the MeshDrawer2D low level system.
 
 begin ()
 Opens up the geom for drawing, don't 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.
 
 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.
 
 rectangle (float x, float y, float w, float h, float u, float v, float us, float vs, const LVector4 color)
 Draws a 2D rectangle which can be clipped.
 
 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 (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 (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.
 
 setBudget (int budget)
 Sets the total triangle budget of the drawer.
 
 setClip (float x, float y, float w, float h)
 Sets the clipping rectangle.
 
- 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.
 
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.
 

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.
 

Detailed Description

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

It allows clipping and several 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 clipping 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 which can be clipped.

◆ 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 the clipping rectangle.