3DCoatScripting  4.8.31β
С помощью скриптинга можно управлять возможностями Коута и расширять его функционал.
Класс coat::scripto::DebugDraw

Access to debugging like viewport-output. Подробнее...

Открытые члены

template<class T >
DebugDrawoperator+= (const T &)
 Output the geometry-objects to the viewport. Подробнее...
 
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. Подробнее...
 
DebugDrawtransform (const Mat4 &m)
 Set a transformation matrix to the viewport. Подробнее...
 
Mat4 transform () const
 Get a current transformation matrix from the viewport. Подробнее...
 
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)
 

Подробное описание

Access to debugging like viewport-output.

debug-draw.png

Use this two lines for access to DebugDraw:

Debug dbg;
DebugDraw drw = dbg.draw();
Начиная с
4.5.32

Методы

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();