CAPD DynSys Library  5.2.0
capd::krak::Coord3D Class Referenceabstract

#include <capd/krak/coord3d.h>

Public Member Functions

 Coord3D (capd::krak::Frame *_frm=NULL)
 Creates a new Coord3D object. More...
 
virtual ~Coord3D ()
 
capd::krak::Frameframe ()
 Returns the frame to which the object is attached. More...
 
capd::krak::FramesetFrame (capd::krak::Frame *f)
 Sets the frame of the object to _frm . More...
 
void setCenter (int i, int j)
 Sets the center (i.e. More...
 
double scale ()
 Returns the scale (the factor which is used when translating 3D coordinates to pixels) More...
 
double setScale (double s)
 Sets the scale of the system to scale . More...
 
virtual void map (double x, double y, double z, int *i, int *j)=0
 Maps the 3D coordinates of the point (x, y , z) to the frame pixel coordinates (this is a pure virtual function in Coord3D. More...
 
void map (const Point3D &p, int *i, int *j)
 Maps the 3D coordinates of the point p to the frame pixel coordinates (this is a pure virtual function in Coord3D. More...
 
int fgColor ()
 Returns the foreground color of the attached frame. More...
 
int setFgColor (int fc)
 Sets the foreground color of the attached frame to color . More...
 
int bgColor ()
 Returns the background color of the attached frame. More...
 
int setBgColor (int bc)
 Sets the background color of the attached frame to color . More...
 
virtual void clear ()
 Clears the attached frame. More...
 
Point3D pos ()
 Returns the current position. More...
 
virtual void jump (const Point3D &pt)
 Jumps to the point pt . More...
 
virtual void jump (double x, double y, double z)
 Jumps to the point (_x, _y , _z ) . More...
 
virtual void dot (double x, double y, double z, int color=FRAME_FG)
 Draws a dot at the position (x, y , z) . More...
 
void dot (const Point3D &p, int color=FRAME_FG)
 Draws a dot at the position (p). More...
 
virtual void lineTo (double x, double y, double z, int color=FRAME_FG)
 Draws a line from the current position the position (x), y , z . More...
 
void lineTo (const Point3D &p, int color=FRAME_FG)
 Draws a line from the current position the position (p). More...
 
virtual void line (double x1, double y1, double z1, double x2, double y2, double z2, int color=FRAME_FG)
 Draws a line from the point (x1, y1 , z1 ) to (x2 , y2 , z2 ) . More...
 
void line (const Point3D &p1, const Point3D &p2, int color=FRAME_FG)
 Draws a line from the point p1 to p2. More...
 
virtual void box (double x1, double y1, double z1, double x2, double y2, double z2, int color=FRAME_FG)
 Draws a box with a corner in (x1, y1 , z1 ) and and in (x2, y2 , z2). More...
 
void box (const Point3D &p1, const Point3D &p2, int color=FRAME_FG)
 Draws a box with a corner in p1 and and in p2. More...
 
virtual void Xcrss (double x, double y, double z, int size=1, int color=FRAME_FG)
 Draw a cross with in the point (x), y , z and and in (x2), y2 , z2 . More...
 
void Xcrss (const Point3D &p, int size=1, int color=FRAME_FG)
 
virtual void drawAxis ()=0
 Draws the axis of the system. More...
 

Protected Attributes

capd::krak::Framefrm
 
int cx
 
int cy
 
Point3D cpos
 
double sc
 

Constructor & Destructor Documentation

◆ ~Coord3D()

virtual capd::krak::Coord3D::~Coord3D ( )
inlinevirtual

Member Function Documentation

◆ box()

void capd::krak::Coord3D::box ( const Point3D p1,
const Point3D p2,
int  color = FRAME_FG 
)
inline

Draws a box with a corner in p1 and and in p2.

The edges are parallel to the axis. The current position is moved to p2.

Parameters
colorThe color of the box. If it is FRAME_FG then the current foreground color is used

◆ dot()

void capd::krak::Coord3D::dot ( const Point3D p,
int  color = FRAME_FG 
)
inline

Draws a dot at the position (p).

The current position is unaffected.

Parameters
colorThe color of the dot. If it is FRAME_FG then the current foreground color is used

◆ drawAxis()

virtual void capd::krak::Coord3D::drawAxis ( )
pure virtual

Draws the axis of the system.

(this is a pure virtual function in Coord3D. Implemented in IsomCoord3D)

Implemented in capd::krak::IsomCoord3D.

◆ frame()

capd::krak::Frame* capd::krak::Coord3D::frame ( )
inline

Returns the frame to which the object is attached.

◆ line()

void capd::krak::Coord3D::line ( const Point3D p1,
const Point3D p2,
int  color = FRAME_FG 
)
inline

Draws a line from the point p1 to p2.

The current position is moved the end of the line.

Parameters
colorThe color of the line. If it is FRAME_FG then the current foreground color is used

◆ lineTo()

void capd::krak::Coord3D::lineTo ( const Point3D p,
int  color = FRAME_FG 
)
inline

Draws a line from the current position the position (p).

The current position is moved the end of the line.

Parameters
colorThe color of the line. If it is FRAME_FG then the current foreground color is used

◆ map() [1/2]

void capd::krak::Coord3D::map ( const Point3D p,
int i,
int j 
)
inline

Maps the 3D coordinates of the point p to the frame pixel coordinates (this is a pure virtual function in Coord3D.

Implemented in IsomCoord3D::top(IsomCoord3D))

◆ map() [2/2]

virtual void capd::krak::Coord3D::map ( double  x,
double  y,
double  z,
int i,
int j 
)
pure virtual

Maps the 3D coordinates of the point (x, y , z) to the frame pixel coordinates (this is a pure virtual function in Coord3D.

Implemented in IsomCoord3D::top(IsomCoord3D))

Implemented in capd::krak::IsomCoord3D.

◆ pos()

Point3D capd::krak::Coord3D::pos ( )
inline

Returns the current position.

◆ scale()

double capd::krak::Coord3D::scale ( )
inline

Returns the scale (the factor which is used when translating 3D coordinates to pixels)

◆ Xcrss()

void capd::krak::Coord3D::Xcrss ( const Point3D p,
int  size = 1,
int  color = FRAME_FG 
)
inline

Member Data Documentation

◆ cpos

Point3D capd::krak::Coord3D::cpos
protected

◆ cx

int capd::krak::Coord3D::cx
protected

◆ cy

int capd::krak::Coord3D::cy
protected

◆ frm

capd::krak::Frame* capd::krak::Coord3D::frm
protected

◆ sc

double capd::krak::Coord3D::sc
protected