#include <pg_draw.h>

Public Types | |
| enum | DrawType { TYPE_NODE, TYPE_PRIM, TYPE_SPRT } |
| The types of the drawable-objects. More... | |
| enum | DepthTest { DEPTH_TEST_ALWAYS, DEPTH_TEST_LESS, DEPTH_TEST_GREATER, DEPTH_TEST_LEQUAL, DEPTH_TEST_GEQUAL } |
| The types of the depth tests. More... | |
| enum | BlendMode { BLEND_OFF, BLEND_HALF, BLEND_ADD, BLEND_DEST_ALPHA } |
| The types of the alpha-blending mode. More... | |
| enum | DrawFlag { FLAG_BOUND_CLIP, FLAG_SORT, FLAG_WRITE_RGB, FLAG_WRITE_ALPHA, FLAG_WRITE_DEPTH, FLAG_BACKFACE_CULLING, FLAG_BILINEAR } |
| The flags which specify the drawing attributes. More... | |
Public Member Functions | |
| pgDefineException (ExceptionInvalidArgument) | |
| pgDefineException (ExceptionInvalidCall) | |
| pgDefineException (ExceptionNotInitialized) | |
| virtual | ~pgDraw () |
| Destructs this pgDraw. | |
| bool | hasScreen () const |
| Returns whether this pgDraw belongs to a pgScr directly. | |
| pgID | getScreenID () const |
| Returns the ID of the screen which this pgDraw belongs to directly. | |
| void | setScreenID (pgID scr_id) |
| TODO. | |
| bool | hasParent () const |
| Returns whether this pgDraw has a parent pgDraw. | |
| pgDraw * | getParentN () const |
| Returns the parent pgDraw of this pgDraw. | |
| void | setParent (pgDraw *parent) |
| TODO. | |
| pgDraw * | getPrevAllN () const |
| Returns the previous pgDraw of this pgDraw. | |
| pgDraw * | getNextAllN () const |
| Returns the next pgDraw of this pgDraw. | |
| pgDraw * | getPrevSiblingN () const |
| Returns the previous sibling pgDraw of this pgDraw. | |
| pgDraw * | getNextSiblingN () const |
| Returns the next sibling pgDraw of this pgDraw. | |
| pgDraw * | getLastDesc () const |
| TODO. | |
| bool | hasChild () const |
| TODO. | |
| pgDraw * | getFirstChildN () const |
| TODO. | |
| pgDraw * | getLastChildN () const |
| TODO. | |
| void | moveFirst () |
| TODO. | |
| void | moveLast () |
| TODO. | |
| void | moveBefore (pgDraw *draw) |
| TODO. | |
| void | moveAfter (pgDraw *draw) |
| TODO. | |
| DrawType | getType () const |
| TODO. | |
| bool | isVisible () const |
| TODO. | |
| void | setVisible (bool is_visible) |
| TODO. | |
| pgCol | getColor () const |
| TODO. | |
| void | setColor (pgCol col) |
| TODO. | |
| DepthTest | getDepthTest () const |
| TODO. | |
| void | setDepthTest (DepthTest depth_test) |
| TODO. | |
| BlendMode | getBlendMode () const |
| TODO. | |
| void | setBlendMode (BlendMode blend_mode) |
| TODO. | |
| bool | isDrawFlag (DrawFlag draw_flag) const |
| TODO. | |
| void | setDrawFlag (DrawFlag draw_flag, bool is_on) |
| TODO. | |
| void | clearDrawFlag () |
| TODO. | |
| void | copyDrawFlag (const pgDraw *src) |
| TODO. | |
| void | setPreset_defaultBlendOff () |
| TODO. | |
| void | setPreset_defaultBlendHalf () |
| TODO. | |
| void | setPreset_defaultBlendAdd () |
| TODO. | |
| const pgVec & | getClipBoundMin () const |
| TODO. | |
| const pgVec & | getClipBoundMax () const |
| TODO. | |
| void | setClipBound (const pgVec &bound_min, const pgVec &bound_max) |
| TODO. | |
| const pgVec & | getSortCenter () const |
| TODO. | |
| void | setSortCenter (const pgVec &sort_center) |
| TODO. | |
| r32 | getSortOffset () const |
| Returns the value of sort offset. | |
| void | setSortOffset (r32 sort_offset) |
| Sets the specified value of sort offset. | |
| pgID | getTextureID () const |
| Returns the texture ID which this pgDraw uses. | |
| void | setTextureID (pgID tex_id) |
| Sets the specified texture ID to this pgDraw. | |
| pgMat & | local () |
| Returns the local matrix. | |
| pgMat | calcWorld () const |
| Calculates and returns the world matrix at present. | |
| pgCol | calcFinalColor () const |
| Calculates and returns the final drawing color at present. | |
Protected Types | |
| enum | PrivateFlag { FLAG_INITIALIZED, FLAG_VISIBLE } |
Protected Member Functions | |
| void | setupWorld () |
| void | setupFinalColor () |
| void | setupSortValue (const pgMat &view) |
| void | setupDrawState () |
| virtual void | render (const pgMat &view) |
Protected Attributes | |
| pgTree< pgDraw > | m_tree |
| pgType< u8, DrawType > | m_type |
| pgType< u8, DepthTest > | m_depth_test |
| pgType< u8, BlendMode > | m_blend_mode |
| pgFlag< u8, PrivateFlag > | m_private_flag |
| pgFlag< u16, DrawFlag > | m_draw_flag |
| pgID | m_scr_id |
| pgTex * | m_tex |
| pgMat | m_local |
| pgMat | m_world |
| pgCol | m_local_col |
| pgCol | m_final_col |
| pgVec | m_bound_min |
| pgVec | m_bound_max |
| pgVec | m_sort_center |
| r32 | m_sort_offset |
| r32 | m_sort_value |
| pgDraw * | m_next_sort |
Friends | |
| class | pgScr |
| class | pgDrawMgr |
| enum pgDraw::BlendMode |
| enum pgDraw::DepthTest |
| enum pgDraw::DrawFlag |
| enum pgDraw::DrawType |
| pgCol pgDraw::calcFinalColor | ( | ) | const |
Calculates and returns the final drawing color at present.
| pgMat pgDraw::calcWorld | ( | ) | const |
Calculates and returns the world matrix at present.
| pgDraw* pgDraw::getNextAllN | ( | ) | const |
| pgDraw* pgDraw::getNextSiblingN | ( | ) | const |
| pgDraw* pgDraw::getParentN | ( | ) | const |
| pgDraw* pgDraw::getPrevAllN | ( | ) | const |
| pgDraw* pgDraw::getPrevSiblingN | ( | ) | const |
| pgID pgDraw::getScreenID | ( | ) | const |
| r32 pgDraw::getSortOffset | ( | ) | const |
Returns the value of sort offset.
| pgID pgDraw::getTextureID | ( | ) | const |
Returns the texture ID which this pgDraw uses.
If no texture is used, returns pgID::ZERO.
| bool pgDraw::hasParent | ( | ) | const |
| bool pgDraw::hasScreen | ( | ) | const |
| pgMat& pgDraw::local | ( | ) |
Returns the local matrix.
| void pgDraw::setSortOffset | ( | r32 | sort_offset | ) |
Sets the specified value of sort offset.
| sort_offset | The value of sort offset. |
| void pgDraw::setTextureID | ( | pgID | tex_id | ) |
Sets the specified texture ID to this pgDraw.
If pgID::ZERO is specified, uses no texture.
| tex_id | A texture ID. |
1.5.8