#include <CPanel.h>
Inheritance diagram for cPanel:
Public Member Functions | |
cPanel (cWorld *a_world, const bool a_enableCollisionDetecion=false) | |
Constructor of cPanel. | |
virtual | ~cPanel () |
Destructor of cPanel. | |
bool | getDisplayRect () |
Returns true if a solid rectangle is being rendered to represent the panel. | |
void | setDisplayRect (const bool &a_showRect) |
Controls the rendering of a solid rectangle at the location of the panel. | |
bool | getDisplayEdges () |
Returns true if a rectangle outline is being rendered around the panel. | |
void | setDisplayEdges (const bool &a_showEdges) |
Controls the rendering of a rectangle outline around the panel. | |
void | setSize (const cVector3d &a_size) |
Set the width and height of the panel (in pixels) (z is ignored). | |
cVector3d | getSize () |
Get the width and height of the panel (in pixels) (z is ignored). | |
void | setEdgeWidth (const float &a_width) |
Set the width used to render the panel outline. | |
float | getEdgeWidth () |
Get the width used to render the panel outline. | |
virtual void | render (const int a_renderMode=0) |
Render the panel (overrides the parent render function). | |
Public Attributes | |
cColorf | m_rectColor |
cColorf | m_edgeColor |
The color of the rectangle outline. Has no effect if m_showEdges is false. | |
bool | m_disableClipping |
Should clipping be explicitly disabled for this panel? | |
bool | m_useLighting |
Should I use GL lighting? Usually you want this off for 'true 2d'. | |
bool | m_disableDepthTest |
Should depth-testing be explicitly disabled for this panel? | |
bool | m_usePolygonOffset |
Should polygon-offseting be used for this panel? | |
Protected Attributes | |
bool | m_showRect |
Controls the rendering of a solid rectangle at the location of the panel. | |
bool | m_showEdges |
Controls the rendering of a rectangle outline around the panel. | |
float | m_edgeWidth |
The width used to render the panel outline. | |
cVector3d | m_size |
The size of the panel (in 2D mode, this is in pixels and z is ignored). |
cPanel::cPanel | ( | cWorld * | a_world, | |
const bool | a_enableCollisionDetecion = false | |||
) |
void cPanel::setSize | ( | const cVector3d & | a_size | ) |
Set the width and height of the panel (in pixels) (z is ignored).
Set the width and height of the panel (in pixels) (z is ignored)
a_size | New size of the panel, in pixels (for 2D rendering) or GL units (for 3D rendering). z is ignored. |
void cPanel::render | ( | const int | a_renderMode = 0 |
) | [virtual] |
Render the panel (overrides the parent render function).
Renders a cPanel to the display
a_renderMode | Current rendering pass; see cGenericObject::render() |
Reimplemented from cMesh.
Reimplemented in cLabelPanel.
The color of the background rectangle. Has no effect if m_showRect is false, or if m_useColors or m_useMaterials are true. By default, this is the color used to represent the rectangle.
If texturing is enabled, you can use the alpha component of this color to control the alpha of an opaque texture. This is especially useful if you set the texture itself to render in GL_DECAL mode, so the color comes entirely from the texture and the alpha comes from here.