30 #if !defined(WITH_CAIRO)
31 #error "Board3DTo2D requires Cairo (WITH_CAIRO option when building DGtal)"
34 #if defined(Board3DTo2D_RECURSES)
35 #error Recursive header files inclusion detected in Board3DTo2D.h
38 #define Board3DTo2D_RECURSES
40 #if !defined Board3DTo2D_h
51 #include "DGtal/base/Common.h"
52 #include "DGtal/base/CountedPtr.h"
53 #include "DGtal/io/Display3D.h"
54 #include "DGtal/io/Color.h"
56 #include "DGtal/kernel/CSpace.h"
69 template <
typename Space = Z3i::Space,
typename KSpace = Z3i::KSpace>
108 return "Board3DTo2D";
189 template <
typename TDrawableWithDisplay3D>
223 void MulMt(
double v[4],
double mat[16],
double b[4]);
240 double eyex,
double eyey,
double eyez,
241 double dirx,
double diry,
double dirz,
242 double upx,
double upy,
double upz);
258 void project(
double x3d,
double y3d,
double z3d,
double &x2d,
double &y2d);
283 template <
typename Space,
typename KSpace>
298 #include "DGtal/io/boards/Board3DTo2D.ih"
305 #undef Board3DTo2D_RECURSES
Class for PDF, PNG, PS, EPS, SVG export drawings with Cairo with 3D->2D projection.
void project(double x3d, double y3d, double z3d, double &x2d, double &y2d)
static void TransposeMt(double tmat[16], double mat[16])
std::string className() const
int Viewport[4]
2D viewport
double camera_upVector[3]
camera up-vector
static void LookAtMt(double mat[16], double eyex, double eyey, double eyez, double dirx, double diry, double dirz, double upx, double upy, double upz)
static void MulMt(double v[4], double mat[16], double b[4])
void setNearFar(double _near, double _far)
double ZNear
znear distance
double camera_direction[3]
camera direction
void setCameraUpVector(double x, double y, double z)
void setCameraDirection(double x, double y, double z)
double camera_position[3]
camera position
void saveCairo(const char *filename, CairoType type, int bWidth, int bHeight)
Board3DTo2D & operator<<(const DGtal::Color &aColor)
void precompute_projection_matrix()
DGtal::Color myDefaultColor
default color
Board3DTo2D & operator<<(const TDrawableWithDisplay3D &object)
BOOST_CONCEPT_ASSERT((concepts::CSpace< Space >))
void setCameraPosition(double x, double y, double z)
void selfDisplay(std::ostream &out) const
Board3DTo2D(KSpace KSEmb)
Structure representing an RGB triple with alpha component.
Aim: This semi abstract class defines the stream mechanism to display 3d primitive (like BallVector,...
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex,...
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.