Nebula
|
#include <im3d.h>
Public Member Functions | |
Context () | |
~Context () | |
void | begin (PrimitiveMode _mode) |
void | end () |
void | vertex (const Vec3 &_position, float _size, Color _color) |
void | vertex (const Vec3 &_position) |
void | text (const Vec3 &_position, float _size, Color _color, TextFlags _flags, const char *_textStart, const char *_textEnd) |
void | text (const Vec3 &_position, float _size, Color _color, TextFlags _flags, const char *_text, va_list _args) |
void | reset () |
void | merge (const Context &_src) |
void | endFrame () |
void | draw () |
const DrawList * | getDrawLists () const |
U32 | getDrawListCount () const |
const TextDrawList * | getTextDrawLists () const |
U32 | getTextDrawListCount () const |
void | setColor (Color _color) |
Color | getColor () const |
void | pushColor (Color _color) |
void | popColor () |
void | setAlpha (float _alpha) |
float | getAlpha () const |
void | pushAlpha (float _alpha) |
void | popAlpha () |
void | setSize (float _size) |
float | getSize () const |
void | pushSize (float _size) |
void | popSize () |
void | setEnableSorting (bool _enable) |
bool | getEnableSorting () const |
void | pushEnableSorting (bool _enable) |
void | popEnableSorting () |
Id | getLayerId () const |
void | pushLayerId (Id _layer) |
void | popLayerId () |
void | setMatrix (const Mat4 &_mat4) |
const Mat4 & | getMatrix () const |
void | pushMatrix (const Mat4 &_mat4) |
void | popMatrix () |
void | setId (Id _id) |
Id | getId () const |
void | pushId (Id _id) |
void | popId () |
AppData & | getAppData () |
bool | gizmoAxisTranslation_Behavior (Id _id, const Vec3 &_origin, const Vec3 &_axis, float _snap, float _worldHeight, float _worldSize, Vec3 *_out_) |
void | gizmoAxisTranslation_Draw (Id _id, const Vec3 &_origin, const Vec3 &_axis, float _worldHeight, float _worldSize, Color _color) |
bool | gizmoPlaneTranslation_Behavior (Id _id, const Vec3 &_origin, const Vec3 &_normal, float _snap, float _worldSize, Vec3 *_out_) |
void | gizmoPlaneTranslation_Draw (Id _id, const Vec3 &_origin, const Vec3 &_normal, float _worldSize, Color _color) |
bool | gizmoAxislAngle_Behavior (Id _id, const Vec3 &_origin, const Vec3 &_axis, float _snap, float _worldRadius, float _worldSize, float *_out_) |
void | gizmoAxislAngle_Draw (Id _id, const Vec3 &_origin, const Vec3 &_axis, float _worldRadius, float _angle, Color _color, float _minAlpha) |
bool | gizmoAxisScale_Behavior (Id _id, const Vec3 &_origin, const Vec3 &_axis, float _snap, float _worldHeight, float _worldSize, float *_out_) |
void | gizmoAxisScale_Draw (Id _id, const Vec3 &_origin, const Vec3 &_axis, float _worldHeight, float _worldSize, Color _color) |
float | pixelsToWorldSize (const Vec3 &_position, float _pixels) |
float | worldSizeToPixels (const Vec3 &_position, float _pixels) |
int | estimateLevelOfDetail (const Vec3 &_position, float _worldSize, int _min=4, int _max=256) |
bool | makeHot (Id _id, float _depth, bool _intersects) |
void | makeActive (Id _id) |
void | resetId () |
bool | isKeyDown (Key _key) const |
bool | wasKeyPressed (Key _key) const |
bool | isVisible (const VertexData *_vdata, DrawPrimitiveType _prim) |
bool | isVisible (const Vec3 &_origin, float _radius) |
bool | isVisible (const Vec3 &_min, const Vec3 &_max) |
U32 | getPrimitiveCount (DrawPrimitiveType _type) const |
U32 | getTextCount () const |
U32 | getLayerCount () const |
Public Attributes | |
bool | m_gizmoLocal |
GizmoMode | m_gizmoMode |
Id | m_activeId |
Id | m_hotId |
float | m_hotDepth |
Id | m_appId |
Id | m_appActiveId |
Id | m_appHotId |
Vec3 | m_gizmoStateVec3 |
Mat3 | m_gizmoStateMat3 |
float | m_gizmoStateFloat |
float | m_gizmoHeightPixels |
float | m_gizmoSizePixels |
Private Types | |
typedef Vector< VertexData > | VertexList |
typedef Vector< TextData > | TextList |
Private Member Functions | |
void | sort () |
int | findLayerIndex (Id _id) const |
VertexList * | getCurrentVertexList () |
TextList * | getCurrentTextList () |
Private Attributes | |
Vector< Color > | m_colorStack |
Vector< float > | m_alphaStack |
Vector< float > | m_sizeStack |
Vector< bool > | m_enableSortingStack |
Vector< Mat4 > | m_matrixStack |
Vector< Id > | m_idStack |
Vector< Id > | m_layerIdStack |
Vector< VertexList * > | m_vertexData [2] |
int | m_vertexDataIndex |
Vector< Id > | m_layerIdMap |
int | m_layerIndex |
Vector< DrawList > | m_drawLists |
bool | m_sortCalled |
bool | m_endFrameCalled |
Vector< TextList * > | m_textData |
Vector< char > | m_textBuffer |
Vector< TextDrawList > | m_textDrawLists |
PrimitiveMode | m_primMode |
DrawPrimitiveType | m_primType |
U32 | m_firstVertThisPrim |
U32 | m_vertCountThisPrim |
Vec3 | m_minVertThisPrim |
Vec3 | m_maxVertThisPrim |
AppData | m_appData |
bool | m_keyDownCurr [Key_Count] |
bool | m_keyDownPrev [Key_Count] |
Vec4 | m_cullFrustum [FrustumPlane_Count] |
int | m_cullFrustumCount |
|
private |
|
private |
Context::Context | ( | ) |
Context::~Context | ( | ) |
void Context::begin | ( | PrimitiveMode | _mode | ) |
void Context::draw | ( | ) |
void Context::end | ( | ) |
void Context::endFrame | ( | ) |
int Context::estimateLevelOfDetail | ( | const Vec3 & | _position, |
float | _worldSize, | ||
int | _min = 4, | ||
int | _max = 256 ) |
|
private |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
U32 Context::getPrimitiveCount | ( | DrawPrimitiveType | _type | ) | const |
|
inline |
U32 Context::getTextCount | ( | ) | const |
|
inline |
|
inline |
bool Context::gizmoAxislAngle_Behavior | ( | Id | _id, |
const Vec3 & | _origin, | ||
const Vec3 & | _axis, | ||
float | _snap, | ||
float | _worldRadius, | ||
float | _worldSize, | ||
float * | _out_ ) |
void Context::gizmoAxislAngle_Draw | ( | Id | _id, |
const Vec3 & | _origin, | ||
const Vec3 & | _axis, | ||
float | _worldRadius, | ||
float | _angle, | ||
Color | _color, | ||
float | _minAlpha ) |
bool Context::gizmoAxisScale_Behavior | ( | Id | _id, |
const Vec3 & | _origin, | ||
const Vec3 & | _axis, | ||
float | _snap, | ||
float | _worldHeight, | ||
float | _worldSize, | ||
float * | _out_ ) |
void Context::gizmoAxisScale_Draw | ( | Id | _id, |
const Vec3 & | _origin, | ||
const Vec3 & | _axis, | ||
float | _worldHeight, | ||
float | _worldSize, | ||
Color | _color ) |
bool Context::gizmoAxisTranslation_Behavior | ( | Id | _id, |
const Vec3 & | _origin, | ||
const Vec3 & | _axis, | ||
float | _snap, | ||
float | _worldHeight, | ||
float | _worldSize, | ||
Vec3 * | _out_ ) |
void Context::gizmoAxisTranslation_Draw | ( | Id | _id, |
const Vec3 & | _origin, | ||
const Vec3 & | _axis, | ||
float | _worldHeight, | ||
float | _worldSize, | ||
Color | _color ) |
bool Context::gizmoPlaneTranslation_Behavior | ( | Id | _id, |
const Vec3 & | _origin, | ||
const Vec3 & | _normal, | ||
float | _snap, | ||
float | _worldSize, | ||
Vec3 * | _out_ ) |
void Context::gizmoPlaneTranslation_Draw | ( | Id | _id, |
const Vec3 & | _origin, | ||
const Vec3 & | _normal, | ||
float | _worldSize, | ||
Color | _color ) |
|
inline |
bool Context::isVisible | ( | const Vec3 & | _origin, |
float | _radius ) |
bool Context::isVisible | ( | const VertexData * | _vdata, |
DrawPrimitiveType | _prim ) |
void Context::makeActive | ( | Id | _id | ) |
bool Context::makeHot | ( | Id | _id, |
float | _depth, | ||
bool | _intersects ) |
void Context::merge | ( | const Context & | _src | ) |
float Context::pixelsToWorldSize | ( | const Vec3 & | _position, |
float | _pixels ) |
|
inline |
|
inline |
void Context::popEnableSorting | ( | ) |
|
inline |
void Context::popLayerId | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
void Context::pushEnableSorting | ( | bool | _enable | ) |
|
inline |
void Context::pushLayerId | ( | Id | _layer | ) |
|
inline |
|
inline |
void Context::reset | ( | ) |
void Context::resetId | ( | ) |
|
inline |
|
inline |
void Context::setEnableSorting | ( | bool | _enable | ) |
|
inline |
|
inline |
|
inline |
|
private |
void Context::text | ( | const Vec3 & | _position, |
float | _size, | ||
Color | _color, | ||
TextFlags | _flags, | ||
const char * | _text, | ||
va_list | _args ) |
void Context::text | ( | const Vec3 & | _position, |
float | _size, | ||
Color | _color, | ||
TextFlags | _flags, | ||
const char * | _textStart, | ||
const char * | _textEnd ) |
|
inline |
|
inline |
float Context::worldSizeToPixels | ( | const Vec3 & | _position, |
float | _pixels ) |
Id Im3d::Context::m_activeId |
|
private |
Id Im3d::Context::m_appActiveId |
|
private |
Id Im3d::Context::m_appHotId |
Id Im3d::Context::m_appId |
|
private |
|
private |
|
private |
|
private |
|
private |
float Im3d::Context::m_gizmoHeightPixels |
bool Im3d::Context::m_gizmoLocal |
GizmoMode Im3d::Context::m_gizmoMode |
float Im3d::Context::m_gizmoSizePixels |
float Im3d::Context::m_gizmoStateFloat |
Mat3 Im3d::Context::m_gizmoStateMat3 |
Vec3 Im3d::Context::m_gizmoStateVec3 |
float Im3d::Context::m_hotDepth |
Id Im3d::Context::m_hotId |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |