2 #include "IBatchedElementDraw.h" 4 #include "unordered_ref_array.h" 75 void ClearParticles();
83 void DrawAll(
bool bClear =
true);
90 void DrawBatchedThickLines(
bool bClear =
true);
92 void DrawBatchedParticles(
bool bClear =
true);
106 std::vector<LINEVERTEX> m_lines_vertex_array;
107 std::vector<int16> m_lines_index_array;
118 bool IsScreenSpace()
const {
return Thickness < 0.f; };
121 std::vector<BatchedThickLines> m_listThickLines;
124 std::vector<ParticleRenderPass> m_ParticleRenderPasses;
virtual PARAVECTOR3 GetDefaultColor()
set the current draw color.
Definition: BatchedElementDraw.h:62
virtual void AddThickLine(const PARAVECTOR3 &from, const PARAVECTOR3 &to, const PARAVECTOR4 &color, float fThickness=0.f, float DepthBias=0.f)
draw line with thickness
Definition: BatchedElementDraw.cpp:54
virtual int GetDebugDrawMode()
bitwise fields of PhysicsDebugDrawModes
Definition: BatchedElementDraw.cpp:152
virtual void AddThickLines(const PARAVECTOR3 *points, int nPointCount, const PARAVECTOR4 &color, float fThickness=0.f, float DepthBias=0.f)
nPointCount-1 lines segment is drawn
Definition: BatchedElementDraw.cpp:81
int GetLineCount()
get the total number of line primitives in the cached render list.
Definition: BatchedElementDraw.cpp:164
virtual void SetDebugDrawMode(int debugMode)
bitwise fields of IParaDebugDraw::DebugDrawModes
Definition: BatchedElementDraw.cpp:147
different physics engine has different winding order.
Definition: EventBinding.h:32
virtual void ReportErrorWarning(const char *warningString)
draw a contact point with a given color.
Definition: BatchedElementDraw.cpp:131
void DrawBatchedLines(bool bClear=true)
draw all cached line primitives since last Clear() call.
Definition: BatchedElementDraw.cpp:186
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
virtual PARAVECTOR3 GetRenderOffset()
get current render offset.
Definition: BatchedElementDraw.h:50
IParaDebugDraw draw interface draws line based primitives for debugging purposes. ...
Definition: IBatchedElementDraw.h:12
void SortParticles()
sort particle into render passes according to texture.
Definition: BatchedElementDraw.cpp:514
virtual void SetDefaultColor(const PARAVECTOR3 &color)
get the current draw color.
Definition: BatchedElementDraw.h:59
IParaDebugDraw draw interface draws line based primitives for debugging purposes. ...
Definition: IParaDebugDraw.h:10
IParaDebugDraw * GetDebugDrawInterface()
deprecated: interface
Definition: BatchedElementDraw.cpp:181
virtual void DrawLine(const PARAVECTOR3 &from, const PARAVECTOR3 &to, const PARAVECTOR3 &color)
draw a line with a given color.
Definition: BatchedElementDraw.cpp:33
Definition: BatchedElementDraw.h:110
similar to unordered array except that it will automatically call addref/Release when obj is added/re...
Definition: unordered_ref_array.h:12
void ClearLines()
clear all cached drawing.
Definition: BatchedElementDraw.cpp:157
virtual void SetRenderOffset(const PARAVECTOR3 &vOffset)
set a render offset.
Definition: BatchedElementDraw.cpp:142
virtual void Draw3dText(const PARAVECTOR3 &location, const char *textString)
draw a text with a given color.
Definition: BatchedElementDraw.cpp:137
base class for a rectangle particle.
Definition: ParticleElement.h:21
virtual void DrawContactPoint(const PARAVECTOR3 &PointOnB, const PARAVECTOR3 &normalOnB, float distance, int lifeTime, const PARAVECTOR3 &color)
draw a contact point with a given color.
Definition: BatchedElementDraw.cpp:126
Definition: PEtypes.h:298
void ClearAll()
call this before scene is reset.
Definition: BatchedElementDraw.cpp:407
static std::vector< char > s_VertexData
tessellation vertex buffer data
Definition: BatchedElementDraw.h:128
Definition: ParaColor.h:275
for drawing special element object(like particles, lines, etc) in the scene.
Definition: BatchedElementDraw.h:15
virtual void AddParticle(CParticleElement *particle)
add a particle.
Definition: BatchedElementDraw.cpp:413
Definition: PEtypes.h:306
virtual void DrawPredefinedLines(const PARAVECTOR3 *lines, int nLineCount, const PARAVECTOR3 &color)
draw multiple lines with a given color using the predefined index order.
Definition: BatchedElementDraw.cpp:89