Unravel Engine C++ Reference
Loading...
Searching...
No Matches
DebugDrawEncoderImpl Struct Reference

Classes

struct  MatrixStack
 
struct  State
 

Public Member Functions

 DebugDrawEncoderImpl ()
 
void init (bgfx::Encoder *_encoder)
 
void shutdown ()
 
void begin (bgfx::ViewId _viewId, bool _depthTestLess, bgfx::Encoder *_encoder)
 
void end ()
 
void push ()
 
void pop ()
 
void setDepthTestLess (bool _depthTestLess)
 
void setTransform (const void *_mtx, uint16_t _num=1, bool _flush=true)
 
void setTranslate (float _x, float _y, float _z)
 
void setTranslate (const float *_pos)
 
void pushTransform (const void *_mtx, uint16_t _num, bool _flush=true)
 
void popTransform (bool _flush=true)
 
void pushProgram (bgfx::ProgramHandle _handle)
 
void popProgram ()
 
void pushTranslate (float _x, float _y, float _z)
 
void pushTranslate (const bx::Vec3 &_pos)
 
void setState (bool _depthTest, bool _depthWrite, bool _clockwise, bool _alphaWrite, bool _alphaBlend)
 
void setColor (uint32_t _abgr)
 
void setLod (uint8_t _lod)
 
void setWireframe (bool _wireframe)
 
void setStipple (bool _stipple, float _scale=1.0f, float _offset=0.0f)
 
void setSpin (float _spin)
 
void moveTo (float _x, float _y, float _z=0.0f)
 
void moveTo (const bx::Vec3 &_pos)
 
void moveTo (Axis::Enum _axis, float _x, float _y)
 
void lineTo (float _x, float _y, float _z=0.0f)
 
void lineTo (const bx::Vec3 &_pos)
 
void lineTo (Axis::Enum _axis, float _x, float _y)
 
void close ()
 
void draw (const bx::Aabb &_aabb)
 
void draw (const bx::Cylinder &_cylinder, bool _capsule)
 
void draw (const bx::Disk &_disk)
 
void draw (const bx::Obb &_obb)
 
void draw (const bx::Sphere &_sphere)
 
void draw (const bx::Triangle &_triangle)
 
void setUParams (const Attrib &_attrib, bool _wireframe)
 
void draw (GeometryHandle _handle)
 
void draw (bool _lineList, uint32_t _numVertices, const DdVertex *_vertices, uint32_t _numIndices, const uint16_t *_indices)
 
void drawFrustum (const float *_viewProj)
 
void drawFrustum (const void *_viewProj)
 
void drawArc (Axis::Enum _axis, float _x, float _y, float _z, float _radius, float _degrees)
 
void drawCircle (const bx::Vec3 &_normal, const bx::Vec3 &_center, float _radius, float _weight)
 
void drawCircle (Axis::Enum _axis, float _x, float _y, float _z, float _radius, float _weight)
 
void drawQuad (const bx::Vec3 &_normal, const bx::Vec3 &_center, float _size)
 
void drawQuad (SpriteHandle _handle, const bx::Vec3 &_normal, const bx::Vec3 &_center, float _size)
 
void drawQuad (bgfx::TextureHandle _handle, const bx::Vec3 &_normal, const bx::Vec3 &_center, float _size)
 
void drawCone (const bx::Vec3 &_from, const bx::Vec3 &_to, float _radius)
 
void drawCylinder (const bx::Vec3 &_from, const bx::Vec3 &_to, float _radius, bool _capsule)
 
void drawAxis (float _x, float _y, float _z, float _len, Axis::Enum _highlight, float _thickness)
 
void drawGrid (const bx::Vec3 &_normal, const bx::Vec3 &_center, uint32_t _size, float _step)
 
void drawGrid (Axis::Enum _axis, const bx::Vec3 &_center, uint32_t _size, float _step)
 
void drawOrb (float _x, float _y, float _z, float _radius, Axis::Enum _hightlight)
 
void draw (DebugMesh::Enum _mesh, const float *_mtx, uint16_t _num, bool _wireframe)
 
void softFlush ()
 
void flush ()
 
void flushQuad ()
 

Public Attributes

DebugVertex m_cache [kCacheSize+1]
 
DebugUvVertex m_cacheQuad [kCacheQuadSize]
 
uint16_t m_indices [kCacheSize *2]
 
uint16_t m_pos
 
uint16_t m_posQuad
 
uint16_t m_indexPos
 
uint16_t m_vertexPos
 
uint32_t m_mtxStackCurrent
 
MatrixStack m_mtxStack [32]
 
int8_t m_programStackCurrent
 
bgfx::ProgramHandle m_programStack [32]
 
bgfx::ViewId m_viewId
 
uint8_t m_stack
 
bool m_depthTestLess
 
Attrib m_attrib [kStackSize]
 
State::Enum m_state
 
bgfx::Encoder * m_encoder
 
bgfx::Encoder * m_defaultEncoder
 

Static Public Attributes

static const uint32_t kCacheSize = 1024
 
static const uint32_t kStackSize = 16
 
static const uint32_t kCacheQuadSize = 1024
 

Detailed Description

Definition at line 977 of file debugdraw.cpp.

Constructor & Destructor Documentation

◆ DebugDrawEncoderImpl()

DebugDrawEncoderImpl::DebugDrawEncoderImpl ( )
inline

Definition at line 979 of file debugdraw.cpp.

Member Function Documentation

◆ begin()

void DebugDrawEncoderImpl::begin ( bgfx::ViewId _viewId,
bool _depthTestLess,
bgfx::Encoder * _encoder )
inline

Definition at line 996 of file debugdraw.cpp.

◆ close()

void DebugDrawEncoderImpl::close ( )
inline

Definition at line 1347 of file debugdraw.cpp.

◆ draw() [1/9]

void DebugDrawEncoderImpl::draw ( bool _lineList,
uint32_t _numVertices,
const DdVertex * _vertices,
uint32_t _numIndices,
const uint16_t * _indices )
inline

Definition at line 1555 of file debugdraw.cpp.

◆ draw() [2/9]

void DebugDrawEncoderImpl::draw ( const bx::Aabb & _aabb)
inline

Definition at line 1356 of file debugdraw.cpp.

◆ draw() [3/9]

void DebugDrawEncoderImpl::draw ( const bx::Cylinder & _cylinder,
bool _capsule )
inline

Definition at line 1393 of file debugdraw.cpp.

◆ draw() [4/9]

void DebugDrawEncoderImpl::draw ( const bx::Disk & _disk)
inline

Definition at line 1398 of file debugdraw.cpp.

◆ draw() [5/9]

void DebugDrawEncoderImpl::draw ( const bx::Obb & _obb)
inline

Definition at line 1403 of file debugdraw.cpp.

◆ draw() [6/9]

void DebugDrawEncoderImpl::draw ( const bx::Sphere & _sphere)
inline

Definition at line 1442 of file debugdraw.cpp.

◆ draw() [7/9]

void DebugDrawEncoderImpl::draw ( const bx::Triangle & _triangle)
inline

Definition at line 1460 of file debugdraw.cpp.

◆ draw() [8/9]

void DebugDrawEncoderImpl::draw ( DebugMesh::Enum _mesh,
const float * _mtx,
uint16_t _num,
bool _wireframe )
inline

Definition at line 2110 of file debugdraw.cpp.

◆ draw() [9/9]

void DebugDrawEncoderImpl::draw ( GeometryHandle _handle)
inline

Definition at line 1530 of file debugdraw.cpp.

◆ drawArc()

void DebugDrawEncoderImpl::drawArc ( Axis::Enum _axis,
float _x,
float _y,
float _z,
float _radius,
float _degrees )
inline

Definition at line 1656 of file debugdraw.cpp.

◆ drawAxis()

void DebugDrawEncoderImpl::drawAxis ( float _x,
float _y,
float _z,
float _len,
Axis::Enum _highlight,
float _thickness )
inline

Definition at line 1972 of file debugdraw.cpp.

◆ drawCircle() [1/2]

void DebugDrawEncoderImpl::drawCircle ( Axis::Enum _axis,
float _x,
float _y,
float _z,
float _radius,
float _weight )
inline

Definition at line 1723 of file debugdraw.cpp.

◆ drawCircle() [2/2]

void DebugDrawEncoderImpl::drawCircle ( const bx::Vec3 & _normal,
const bx::Vec3 & _center,
float _radius,
float _weight )
inline

Definition at line 1685 of file debugdraw.cpp.

◆ drawCone()

void DebugDrawEncoderImpl::drawCone ( const bx::Vec3 & _from,
const bx::Vec3 & _to,
float _radius )
inline

Definition at line 1921 of file debugdraw.cpp.

◆ drawCylinder()

void DebugDrawEncoderImpl::drawCylinder ( const bx::Vec3 & _from,
const bx::Vec3 & _to,
float _radius,
bool _capsule )
inline

Definition at line 1939 of file debugdraw.cpp.

◆ drawFrustum() [1/2]

void DebugDrawEncoderImpl::drawFrustum ( const float * _viewProj)
inline

Definition at line 1610 of file debugdraw.cpp.

◆ drawFrustum() [2/2]

void DebugDrawEncoderImpl::drawFrustum ( const void * _viewProj)
inline

Definition at line 1651 of file debugdraw.cpp.

◆ drawGrid() [1/2]

void DebugDrawEncoderImpl::drawGrid ( Axis::Enum _axis,
const bx::Vec3 & _center,
uint32_t _size,
float _step )
inline

Definition at line 2056 of file debugdraw.cpp.

◆ drawGrid() [2/2]

void DebugDrawEncoderImpl::drawGrid ( const bx::Vec3 & _normal,
const bx::Vec3 & _center,
uint32_t _size,
float _step )
inline

Definition at line 2018 of file debugdraw.cpp.

◆ drawOrb()

void DebugDrawEncoderImpl::drawOrb ( float _x,
float _y,
float _z,
float _radius,
Axis::Enum _hightlight )
inline

Definition at line 2094 of file debugdraw.cpp.

◆ drawQuad() [1/3]

void DebugDrawEncoderImpl::drawQuad ( bgfx::TextureHandle _handle,
const bx::Vec3 & _normal,
const bx::Vec3 & _center,
float _size )
inline

Definition at line 1850 of file debugdraw.cpp.

◆ drawQuad() [2/3]

void DebugDrawEncoderImpl::drawQuad ( const bx::Vec3 & _normal,
const bx::Vec3 & _center,
float _size )
inline

Definition at line 1754 of file debugdraw.cpp.

◆ drawQuad() [3/3]

void DebugDrawEncoderImpl::drawQuad ( SpriteHandle _handle,
const bx::Vec3 & _normal,
const bx::Vec3 & _center,
float _size )
inline

Definition at line 1786 of file debugdraw.cpp.

◆ end()

void DebugDrawEncoderImpl::end ( )
inline

Definition at line 1034 of file debugdraw.cpp.

◆ flush()

void DebugDrawEncoderImpl::flush ( )
inline

Definition at line 2141 of file debugdraw.cpp.

◆ flushQuad()

void DebugDrawEncoderImpl::flushQuad ( )
inline

Definition at line 2173 of file debugdraw.cpp.

◆ init()

void DebugDrawEncoderImpl::init ( bgfx::Encoder * _encoder)
inline

Definition at line 986 of file debugdraw.cpp.

◆ lineTo() [1/3]

void DebugDrawEncoderImpl::lineTo ( Axis::Enum _axis,
float _x,
float _y )
inline

Definition at line 1342 of file debugdraw.cpp.

◆ lineTo() [2/3]

void DebugDrawEncoderImpl::lineTo ( const bx::Vec3 & _pos)
inline

Definition at line 1336 of file debugdraw.cpp.

◆ lineTo() [3/3]

void DebugDrawEncoderImpl::lineTo ( float _x,
float _y,
float _z = 0.0f )
inline

Definition at line 1282 of file debugdraw.cpp.

◆ moveTo() [1/3]

void DebugDrawEncoderImpl::moveTo ( Axis::Enum _axis,
float _x,
float _y )
inline

Definition at line 1277 of file debugdraw.cpp.

◆ moveTo() [2/3]

void DebugDrawEncoderImpl::moveTo ( const bx::Vec3 & _pos)
inline

Definition at line 1271 of file debugdraw.cpp.

◆ moveTo() [3/3]

void DebugDrawEncoderImpl::moveTo ( float _x,
float _y,
float _z = 0.0f )
inline

Definition at line 1251 of file debugdraw.cpp.

◆ pop()

void DebugDrawEncoderImpl::pop ( )
inline

Definition at line 1052 of file debugdraw.cpp.

◆ popProgram()

void DebugDrawEncoderImpl::popProgram ( )
inline

Definition at line 1167 of file debugdraw.cpp.

◆ popTransform()

void DebugDrawEncoderImpl::popTransform ( bool _flush = true)
inline

Definition at line 1146 of file debugdraw.cpp.

◆ push()

void DebugDrawEncoderImpl::push ( )
inline

Definition at line 1045 of file debugdraw.cpp.

◆ pushProgram()

void DebugDrawEncoderImpl::pushProgram ( bgfx::ProgramHandle _handle)
inline

Definition at line 1158 of file debugdraw.cpp.

◆ pushTransform()

void DebugDrawEncoderImpl::pushTransform ( const void * _mtx,
uint16_t _num,
bool _flush = true )
inline

Definition at line 1115 of file debugdraw.cpp.

◆ pushTranslate() [1/2]

void DebugDrawEncoderImpl::pushTranslate ( const bx::Vec3 & _pos)
inline

Definition at line 1182 of file debugdraw.cpp.

◆ pushTranslate() [2/2]

void DebugDrawEncoderImpl::pushTranslate ( float _x,
float _y,
float _z )
inline

Definition at line 1175 of file debugdraw.cpp.

◆ setColor()

void DebugDrawEncoderImpl::setColor ( uint32_t _abgr)
inline

Definition at line 1211 of file debugdraw.cpp.

◆ setDepthTestLess()

void DebugDrawEncoderImpl::setDepthTestLess ( bool _depthTestLess)
inline

Definition at line 1064 of file debugdraw.cpp.

◆ setLod()

void DebugDrawEncoderImpl::setLod ( uint8_t _lod)
inline

Definition at line 1217 of file debugdraw.cpp.

◆ setSpin()

void DebugDrawEncoderImpl::setSpin ( float _spin)
inline

Definition at line 1245 of file debugdraw.cpp.

◆ setState()

void DebugDrawEncoderImpl::setState ( bool _depthTest,
bool _depthWrite,
bool _clockwise,
bool _alphaWrite,
bool _alphaBlend )
inline

Definition at line 1187 of file debugdraw.cpp.

◆ setStipple()

void DebugDrawEncoderImpl::setStipple ( bool _stipple,
float _scale = 1.0f,
float _offset = 0.0f )
inline

Definition at line 1229 of file debugdraw.cpp.

◆ setTransform()

void DebugDrawEncoderImpl::setTransform ( const void * _mtx,
uint16_t _num = 1,
bool _flush = true )
inline

Definition at line 1080 of file debugdraw.cpp.

◆ setTranslate() [1/2]

void DebugDrawEncoderImpl::setTranslate ( const float * _pos)
inline

Definition at line 1110 of file debugdraw.cpp.

◆ setTranslate() [2/2]

void DebugDrawEncoderImpl::setTranslate ( float _x,
float _y,
float _z )
inline

Definition at line 1103 of file debugdraw.cpp.

◆ setUParams()

void DebugDrawEncoderImpl::setUParams ( const Attrib & _attrib,
bool _wireframe )
inline

Definition at line 1483 of file debugdraw.cpp.

◆ setWireframe()

void DebugDrawEncoderImpl::setWireframe ( bool _wireframe)
inline

Definition at line 1223 of file debugdraw.cpp.

◆ shutdown()

void DebugDrawEncoderImpl::shutdown ( )
inline

Definition at line 992 of file debugdraw.cpp.

◆ softFlush()

void DebugDrawEncoderImpl::softFlush ( )
inline

Definition at line 2133 of file debugdraw.cpp.

Member Data Documentation

◆ kCacheQuadSize

const uint32_t DebugDrawEncoderImpl::kCacheQuadSize = 1024
static

Definition at line 2235 of file debugdraw.cpp.

◆ kCacheSize

const uint32_t DebugDrawEncoderImpl::kCacheSize = 1024
static

Definition at line 2233 of file debugdraw.cpp.

◆ kStackSize

const uint32_t DebugDrawEncoderImpl::kStackSize = 16
static

Definition at line 2234 of file debugdraw.cpp.

◆ m_attrib

Attrib DebugDrawEncoderImpl::m_attrib[kStackSize]

Definition at line 2270 of file debugdraw.cpp.

◆ m_cache

DebugVertex DebugDrawEncoderImpl::m_cache[kCacheSize+1]

Definition at line 2238 of file debugdraw.cpp.

◆ m_cacheQuad

DebugUvVertex DebugDrawEncoderImpl::m_cacheQuad[kCacheQuadSize]

Definition at line 2239 of file debugdraw.cpp.

◆ m_defaultEncoder

bgfx::Encoder* DebugDrawEncoderImpl::m_defaultEncoder

Definition at line 2275 of file debugdraw.cpp.

◆ m_depthTestLess

bool DebugDrawEncoderImpl::m_depthTestLess

Definition at line 2268 of file debugdraw.cpp.

◆ m_encoder

bgfx::Encoder* DebugDrawEncoderImpl::m_encoder

Definition at line 2274 of file debugdraw.cpp.

◆ m_indexPos

uint16_t DebugDrawEncoderImpl::m_indexPos

Definition at line 2243 of file debugdraw.cpp.

◆ m_indices

uint16_t DebugDrawEncoderImpl::m_indices[kCacheSize *2]

Definition at line 2240 of file debugdraw.cpp.

◆ m_mtxStack

MatrixStack DebugDrawEncoderImpl::m_mtxStack[32]

Definition at line 2261 of file debugdraw.cpp.

◆ m_mtxStackCurrent

uint32_t DebugDrawEncoderImpl::m_mtxStackCurrent

Definition at line 2245 of file debugdraw.cpp.

◆ m_pos

uint16_t DebugDrawEncoderImpl::m_pos

Definition at line 2241 of file debugdraw.cpp.

◆ m_posQuad

uint16_t DebugDrawEncoderImpl::m_posQuad

Definition at line 2242 of file debugdraw.cpp.

◆ m_programStack

bgfx::ProgramHandle DebugDrawEncoderImpl::m_programStack[32]

Definition at line 2264 of file debugdraw.cpp.

◆ m_programStackCurrent

int8_t DebugDrawEncoderImpl::m_programStackCurrent

Definition at line 2263 of file debugdraw.cpp.

◆ m_stack

uint8_t DebugDrawEncoderImpl::m_stack

Definition at line 2267 of file debugdraw.cpp.

◆ m_state

State::Enum DebugDrawEncoderImpl::m_state

Definition at line 2272 of file debugdraw.cpp.

◆ m_vertexPos

uint16_t DebugDrawEncoderImpl::m_vertexPos

Definition at line 2244 of file debugdraw.cpp.

◆ m_viewId

bgfx::ViewId DebugDrawEncoderImpl::m_viewId

Definition at line 2266 of file debugdraw.cpp.


The documentation for this struct was generated from the following file: