3DCoatScripting  4.8.31β
You can manage 3DСoat features with help of scripting
coat::scripto::DebugDraw Class Reference

Access to debugging like viewport-output. More...

Public Member Functions

template<class T >
DebugDrawoperator+= (const T &)
 Output the geometry-objects to the viewport. More...
 
DebugDrawaabb (const AABB &)
 Drawing AABB.
 
DebugDrawaabb (const AABB &, const Color &)
 
DebugDrawaabb (const Vec3 &min, const Vec3 &max)
 
DebugDrawaabb (const Vec3 &, const Vec3 &, const Color &)
 
DebugDrawcolor (const Color::value_t &d)
 Set current color for draw in the viewport.
 
DebugDrawcolor (const Color &d)
 
Color color () const
 Get current color of the viewport.
 
DebugDrawcircle (const Vec3 &p, const Vec3 &normal, float radius)
 Drawing a 2D-circle like billboard.
 
DebugDrawcircle (const Vec3 &p, const Vec3 &normal, float radius, const Color &)
 
DebugDrawlayer (const std::string &name)
 Creates a named layer which contains all next drawing.
 
DebugDrawline (const Line3 &l)
 Drawing Line3.
 
DebugDrawline (const Line3 &l, const Color &color)
 
DebugDrawline (const Line3 &l, const Color &colorBegin, const Color &colorEnd)
 
DebugDrawline (const Line3 &, const Color &colorBegin, const Color &colorEnd, const Color &colorPoint)
 
DebugDrawline (const Vec3 &a, const Vec3 &b)
 Drawing a line from point a to point b.
 
DebugDrawline (const Vec3 &a, const Vec3 &b, const Color &color)
 
DebugDrawline (const Vec3 &a, const Vec3 &b, const Color &colorBegin, const Color &colorEnd)
 
DebugDrawmesh (const Mesh &)
 Drawing Mesh.
 
DebugDrawnote (const Vec3 &p, float v)
 Print a float value to the viewport.
 
DebugDrawnote (const Vec3 &p, float, const Color &)
 
DebugDrawnote (const Vec3 &p, const std::string &s)
 Print a string to the viewport.
 
DebugDrawnote (const Vec3 &p, const std::string &, const Color &)
 
DebugDrawpoint (const Vec3 &)
 Light a point.
 
DebugDrawpoint (const Vec3 &, const Color &)
 
DebugDrawsphere (const Vec3 &p, float radius)
 Drawing a sphere.
 
DebugDrawsphere (const Vec3 &p, float radius, const Color &)
 
DebugDrawtriangle (const Vec3 &a, const Vec3 &b, const Vec3 &c)
 Drawing a triangle.
 
DebugDrawtriangle (const Vec3 &a, const Vec3 &b, const Vec3 &c, const Color &color)
 
DebugDrawtriangle (const Vec3 &a, const Vec3 &b, const Vec3 &c, const Color &, const Color &, const Color &)
 
DebugDrawvector (const Vec3 &p, const Vec3 &v)
 Drawing a vector.
 
DebugDrawvector (const Vec3 &p, const Vec3 &v, const Color &color)
 
DebugDrawvector (const Vec3 &p, const Vec3 &v, const Color &, const Color &)
 
DebugDrawclear ()
 Clear the viewport. More...
 
DebugDrawtransform (const Mat4 &m)
 Set a transformation matrix to the viewport. More...
 
Mat4 transform () const
 Get a current transformation matrix from the viewport. More...
 
template<>
DebugDrawoperator+= (const Color &v)
 
template<>
DebugDrawoperator+= (const AABB &v)
 
template<>
DebugDrawoperator+= (const Line3 &v)
 
template<>
DebugDrawoperator+= (const Lines3 &vs)
 
template<>
DebugDrawoperator+= (const Mesh &v)
 

Detailed Description

Access to debugging like viewport-output.

debug-draw.png

Use this two lines for access to DebugDraw:

Debug dbg;
DebugDraw drw = dbg.draw();
Since
4.5.32

Member Function Documentation

template<class T >
DebugDraw& coat::scripto::DebugDraw::operator+= ( const T &  )

Output the geometry-objects to the viewport.

...
drw += aabb;
drw += line3;
DebugDraw & coat::scripto::DebugDraw::clear ( )

Clear the viewport.

drw.clear();
DebugDraw& coat::scripto::DebugDraw::transform ( const Mat4 m)
inline

Set a transformation matrix to the viewport.

Vec3 scaling( 10 );
Vec3 translation( 0 );
Mat4 m( scaling, translation );
drw.transform( m );
Mat4 coat::scripto::DebugDraw::transform ( ) const
inline

Get a current transformation matrix from the viewport.

Mat4 m = drw.transform();