3DCoat  3D-COAT 4.9.xx
3DCoat is the one application that has all the tools you need to take your 3D idea from a block of digital clay all the way to a production ready, fully textured organic or hard surface model.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
coat::scripto::DebugDraw Class Reference

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

#include <SDebugDraw.h>

Public Member Functions

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

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

DebugDraw & coat::scripto::DebugDraw::aabb ( const AABB v)

Drawing AABB.

References color().

DebugDraw& coat::scripto::DebugDraw::circle ( const Vec3 p,
const Vec3 normal,
float  radius 
)
inline

Drawing a 2D-circle like billboard.

References circle(), and color().

Referenced by circle().

DebugDraw & coat::scripto::DebugDraw::clear ( )

Clear the viewport.

drw.clear();

References color(), and transform().

DebugDraw& coat::scripto::DebugDraw::color ( const Color::value_t &  d)
inline

Set current color for draw in the viewport.

Color coat::scripto::DebugDraw::color ( ) const
inline

Get current color of the viewport.

Referenced by aabb(), circle(), clear(), line(), mesh(), note(), point(), sphere(), triangle(), and vector().

DebugDraw & coat::scripto::DebugDraw::layer ( const std::string &  name)

Creates a named layer which contains all next drawing.

DebugDraw& coat::scripto::DebugDraw::line ( const Line3 l)
inline

Drawing Line3.

References color(), and line().

Referenced by line().

DebugDraw& coat::scripto::DebugDraw::line ( const Vec3 a,
const Vec3 b 
)
inline

Drawing a line from point a to point b.

References color(), and line().

Referenced by line().

DebugDraw & coat::scripto::DebugDraw::mesh ( const Mesh a)

Drawing Mesh.

References color(), and transform().

DebugDraw& coat::scripto::DebugDraw::note ( const Vec3 p,
float  v 
)
inline

Print a float value to the viewport.

References color(), and note().

Referenced by note().

DebugDraw& coat::scripto::DebugDraw::note ( const Vec3 p,
const std::string &  s 
)
inline

Print a string to the viewport.

References color(), and note().

Referenced by note().

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::point ( const Vec3 p)

Light a point.

References color().

DebugDraw& coat::scripto::DebugDraw::sphere ( const Vec3 p,
float  radius 
)
inline

Drawing a sphere.

References color(), and sphere().

Referenced by sphere().

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

Referenced by clear(), and mesh().

DebugDraw& coat::scripto::DebugDraw::triangle ( const Vec3 a,
const Vec3 b,
const Vec3 c 
)
inline

Drawing a triangle.

References color(), and triangle().

Referenced by triangle().

DebugDraw& coat::scripto::DebugDraw::vector ( const Vec3 p,
const Vec3 v 
)
inline

Drawing a vector.

References color(), and vector().

Referenced by vector().


The documentation for this class was generated from the following files: