Imagine++
|
Classes | |
struct | Imagine::Event |
Event info. More... | |
class | Imagine::Mesh |
A mesh representing a 3D object. More... | |
class | Imagine::NativeBitmap |
Native bitmap: image stored in graphics card format, fast to display. More... | |
Typedefs | |
typedef FVector< double, 3 > | Imagine::DoublePoint3 |
Double space point. | |
typedef DoublePoint3 | Imagine::DoubleVector3 |
Double space vector. | |
typedef FVector< float, 3 > | Imagine::FloatPoint3 |
Float space point. | |
typedef FloatPoint3 | Imagine::FloatVector3 |
Float space vector. | |
typedef Coords< 2 > | Imagine::IntPoint2 |
Plane point with integral coordinates. | |
typedef FArray< int, 4 > | Imagine::Quad |
Quadrilateral to insert in a mesh, built from four space point indices. | |
typedef FArray< int, 3 > | Imagine::Triangle |
Triangle to insert in a mesh, built from three space point indices. | |
typedef WindowInternal * | Imagine::Window |
Handle to a display window. | |
Enumerations | |
enum | Imagine::EventState { EVS_NONE =0, EVS_SHIFT =(1<<0), EVS_CONTROL =(1<<1), EVS_ALT =(1<<2) } |
Event State. More... | |
enum | Imagine::EventType { EVT_NONE = 0, EVT_BUT_ON = 2, EVT_BUT_OFF = 3, EVT_MOTION = 5, EVT_KEY_ON, EVT_KEY_OFF } |
Event type (keyboard or mouse event). More... | |
enum | Imagine::KeyCode { KEY_BACK =16777219, KEY_TAB =16777217, KEY_RETURN =16777220, KEY_NUMPAD_ENTER =16777221, KEY_ESCAPE =16777216, KEY_INSERT =16777222, KEY_DELETE =16777223, KEY_HOME =16777232, KEY_END =16777233, KEY_PAGEUP =16777238, KEY_PAGEDOWN, KEY_LEFT =16777234, KEY_UP, KEY_RIGHT, KEY_DOWN, KEY_SHIFT =16777248, KEY_CONTROL =16777249, KEY_CMD =16777299, KEY_ALT =16777251, KEY_PRINT =16777225, KEY_SCROLL =16777254, KEY_PAUSE =16777224, KEY_MENU =16777301, KEY_F1 =16777264, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, KEY_F12, KEY_NUMLOCK =16777253 } |
Keyboard codes for characterless keys. More... | |
enum | Imagine::MeshColorMode { CONSTANT_COLOR, FACE_COLOR, VERTEX_COLOR, FACE_VALUE, VERTEX_VALUE } |
Mesh lighting mode. | |
enum | Imagine::MeshData { VERTEX, TRIANGLE, QUAD } |
Type of mesh data that holds values. | |
enum | Imagine::MeshFaceMode { POINT, LINE, FILL } |
Mesh display mode. | |
enum | Imagine::MeshShadingMode { FLAT_SHADING, SMOOTH_SHADING } |
Mesh shading mode. | |
enum | Imagine::WindowType { WINDOW_2D, WINDOW_3D } |
Type of Window. More... | |
Functions | |
int | Imagine::anyClick () |
Wait for mouse click in any window. More... | |
int | Imagine::anyClick (Window &win, int &subWin) |
Wait for mouse click in any window (returning window). More... | |
int | Imagine::anyGetKey (Window &win, int &subWin, bool ignoreModifier=true) |
Wait for key press in any window. More... | |
int | Imagine::anyGetMouse (int &x, int &y, Window &win, int &subWin) |
Wait for mouse click in any window (returning window and position). More... | |
int | Imagine::anyGetMouse (IntPoint2 &p, Window &win, int &subWin) |
Wait for mouse click in any window (returning window and position). More... | |
Color | Imagine::capturePoint (int x, int y) |
Capture (point). More... | |
Color | Imagine::capturePoint (const IntPoint2 &p) |
Capture (point). More... | |
void | Imagine::captureRectangle (int x, int y, Color *c, int w, int h) |
Capture (sub window). More... | |
void | Imagine::captureRectangle (const IntPoint2 &p, Color *c, int w, int h) |
Capture (sub window). More... | |
void | Imagine::captureRectangle (int x, int y, byte *RGB, int w, int h) |
Capture (sub window). More... | |
void | Imagine::captureRectangle (const IntPoint2 &p, byte *RGB, int w, int h) |
Capture (sub window). More... | |
void | Imagine::captureRectangle (int x, int y, byte *R, byte *G, byte *B, int w, int h) |
Capture (sub window). More... | |
void | Imagine::captureRectangle (const IntPoint2 &p, byte *R, byte *G, byte *B, int w, int h) |
Capture (sub window). More... | |
void | Imagine::captureWindow (Color *&cols, int &w, int &h) |
Window capture. More... | |
void | Imagine::captureWindow (byte *&RGB, int &w, int &h) |
Window capture. More... | |
void | Imagine::captureWindow (byte *&R, byte *&G, byte *&B, int &w, int &h) |
Window capture. More... | |
void | Imagine::clearWindow () |
clearWindow. More... | |
int | Imagine::click () |
Wait for mouse click in active window. More... | |
void | Imagine::closeWindow (Window w) |
Close window. More... | |
AlphaColor * | Imagine::convertColorToAlphaColor (const Imagine::Color *cols, int w, int h) |
Convert a Color Image to a AlphaColor Image. More... | |
void | Imagine::drawArrow (int x1, int y1, int x2, int y2, const AlphaColor &col, int arrowWidth=8, int arrowHeight=5, int style=0, int width=1, bool xorMode=false) |
Arrow. More... | |
void | Imagine::drawArrow (const IntPoint2 &p1, const IntPoint2 &p2, const AlphaColor &col, int arrowWidth=8, int arrowHeight=5, int style=0, int width=1, bool xorMode=false) |
Arrow (IntPoint2). More... | |
void | Imagine::drawArrow (int x1, int y1, int x2, int y2, const AlphaColor &col, double ta, double tl, int style=0, int width=1, bool xorMode=false) |
Arrow. More... | |
void | Imagine::drawArrow (const IntPoint2 &p1, const IntPoint2 &p2, const AlphaColor &col, double ta, double tl, int style=0, int width=1, bool xorMode=false) |
Arrow. More... | |
void | Imagine::drawCircle (int xc, int yc, int r, const Color &col, int penWidth=1, bool xorMode=false) |
Circle. More... | |
void | Imagine::drawCircle (const IntPoint2 &c, int r, const Color &col, int penWidth=1, bool xorMode=false) |
Circle (IntPoint2). More... | |
void | Imagine::drawEllipse (int x, int y, int w, int h, const Color &col, int penWidth=1, bool xorMode=false) |
Ellipse. More... | |
void | Imagine::drawEllipse (const IntPoint2 &p, int w, int h, const Color &col, int penWidth=1, bool xorMode=false) |
Ellipse (IntPoint2). More... | |
void | Imagine::drawLine (int x1, int y1, int x2, int y2, const Color &col, int penWidth=1, bool xorMode=false) |
Line. More... | |
void | Imagine::drawLine (const IntPoint2 &p1, const IntPoint2 &p2, const Color &col, int penWidth=1, bool xorMode=false) |
Line (IntPoint2). More... | |
void | Imagine::drawPoint (int x, int y, const Color &col, bool xorMode=false) |
Point. More... | |
void | Imagine::drawPoint (const IntPoint2 &p, const Color &col, bool xorMode=false) |
Point (IntPoint2). More... | |
void | Imagine::drawPoly (const int x[], const int y[], int n, const Color &col, int width=1, bool xorMode=false) |
Draw a polygon. More... | |
void | Imagine::drawPoly (const IntPoint2 *p, int n, const Color &col, int width=1, bool xorMode=false) |
Polygon (IntPoint2). More... | |
void | Imagine::drawPoly (const int xy[], int n, const Color &col, int width=1, bool xorMode=false) |
Polygon (one array). More... | |
void | Imagine::drawRect (int x, int y, int w, int h, const Color &col, int penWidth=1, bool xorMode=false) |
Rectangle. More... | |
void | Imagine::drawRect (const IntPoint2 &p, int w, int h, const Color &col, int penWidth=1, bool xorMode=false) |
Rectangle (IntPoint2). More... | |
void | Imagine::drawString (int x, int y, const std::string &s, const AlphaColor &col, int fontSize=12, double alpha=0, bool italic=false, bool bold=false, bool underlined=false, bool xorMode=false) |
String. More... | |
void | Imagine::drawString (const IntPoint2 &p, const std::string &s, const AlphaColor &col, int fontSize=12, double alpha=0, bool italic=false, bool bold=false, bool underlined=false, bool xorMode=false) |
String (IntPoint2). More... | |
void | Imagine::enableMouseTracking (bool en) |
Mouse tracking, controlling whether pointer motion triggers an event. More... | |
void | Imagine::endGraphics () |
Terminate graphics application. More... | |
void | Imagine::fillCircle (int xc, int yc, int r, const AlphaColor &col, bool xorMode=false) |
Filled Circle. More... | |
void | Imagine::fillCircle (const IntPoint2 &c, int r, const AlphaColor &col, bool xorMode=false) |
Filled Circle (IntPoint2). More... | |
void | Imagine::fillEllipse (int x, int y, int w, int h, const AlphaColor &col, bool xorMode=false) |
Filled Ellipse. More... | |
void | Imagine::fillEllipse (const IntPoint2 &p, int w, int h, const AlphaColor &col, bool xorMode=false) |
Filled Ellipse (IntPoint2). More... | |
void | Imagine::fillPoly (const int x[], const int y[], int n, const AlphaColor &col, bool xorMode=false) |
Filled Polygon. More... | |
void | Imagine::fillPoly (const IntPoint2 *p, int n, const AlphaColor &col, bool xorMode=false) |
Filled Polygon (IntPoint2). More... | |
void | Imagine::fillPoly (const int xy[], int n, const AlphaColor &col, bool xorMode=false) |
Filled Polygon. More... | |
void | Imagine::fillRect (int x, int y, int w, int h, const AlphaColor &col, bool xorMode=false) |
Filled rectangle. More... | |
void | Imagine::fillRect (const IntPoint2 &p, int w, int h, const AlphaColor &col, bool xorMode=false) |
Filled rectangle (IntPoint2). More... | |
void | Imagine::flushEvents () |
Flush event queue, discarding unhandled events. More... | |
void | Imagine::getEvent (int ms, Event &ev) |
Get keyboard and mouse events. More... | |
int | Imagine::getKey (bool ignoreModifier=true) |
Wait for key press in active window. More... | |
int | Imagine::getMouse (int &x, int &y) |
Wait for mouse click in active window (returning position). More... | |
int | Imagine::getMouse (IntPoint2 &p) |
Wait for mouse click in active window (returning position). More... | |
void | Imagine::hideMesh (const Mesh &M, bool reinitCam=true) |
Hide mesh. More... | |
bool | Imagine::loadAlphaColorImage (const std::string &name, AlphaColor *&acols, int &w, int &h) |
Load color image with alpha channel. More... | |
bool | Imagine::loadAlphaColorImage (const std::string &name, byte *&rgba, int &w, int &h) |
Load color image with alpha channel. More... | |
bool | Imagine::loadColorImage (const std::string &name, Color *&cols, int &w, int &h) |
Load color image. More... | |
bool | Imagine::loadColorImage (const std::string &name, byte *&rgb, int &w, int &h) |
Load color image. More... | |
bool | Imagine::loadColorImage (const std::string &name, byte *&r, byte *&g, byte *&b, int &w, int &h) |
Load color image. More... | |
bool | Imagine::loadColorImage (const std::string &name, byte *&r, byte *&g, byte *&b, byte *&a, int &w, int &h) |
Load color image with alpha channel. More... | |
bool | Imagine::loadGreyImage (const std::string &name, byte *&g, int &w, int &h) |
Load grey image. More... | |
void | Imagine::milliSleep (int msec) |
... More... | |
void | Imagine::noRefreshBegin () |
Norefresh begin. More... | |
void | Imagine::noRefreshEnd () |
Norefresh end. More... | |
void | Imagine::noRefreshPop () |
Norefresh pop. More... | |
void | Imagine::noRefreshPush () |
Norefresh push. More... | |
Window | Imagine::openComplexWindow (int w, int h, const std::string &name="Imagine++", int tabsNb=1, const std::string *tabsNames=0, const WindowType *tabsTypes=0, int x=-1, int y=-1) |
New complex window. More... | |
Window | Imagine::openWindow (int w, int h, const std::string &windowTitle="Imagine++", int x=-1, int y=-1) |
New window for 2D graphics. More... | |
Window | Imagine::openWindow3D (int w, int h, const std::string &windowTitle="Imagine++", int x=-1, int y=-1) |
New window for 3D graphics. More... | |
void | Imagine::putAlphaColorImage (int x, int y, Imagine::AlphaColor *cols, int w, int h, bool xorMode=false, double fact=1.) |
Display color bitmap with alpha channel. More... | |
void | Imagine::putAlphaColorImage (int x, int y, byte *rgba, int w, int h, bool xorMode=false, double fact=1.) |
Display color bitmap with alpha channel. More... | |
void | Imagine::putAlphaColorImage (const IntPoint2 &p, byte *rgba, int w, int h, bool xorMode=false, double fact=1.) |
Display color bitmap with alpha channel. More... | |
void | Imagine::putColorImage (int x, int y, const Color *cols, int w, int h, bool xorMode=false, double fact=1.) |
Display color bitmap. More... | |
void | Imagine::putColorImage (const IntPoint2 &p, const Color *cols, int w, int h, bool xorMode=false, double fact=1.) |
Display color bitmap. More... | |
void | Imagine::putColorImage (int x, int y, const byte *rgb, int w, int h, bool xorMode=false, double fact=1.) |
Display color bitmap. More... | |
void | Imagine::putColorImage (const IntPoint2 &p, const byte *rgb, int w, int h, bool xorMode=false, double fact=1.) |
Display color bitmap. More... | |
void | Imagine::putColorImage (int x, int y, const byte *r, const byte *g, const byte *b, int w, int h, bool xorMode=false, double fact=1.) |
Display color bitmap. More... | |
void | Imagine::putColorImage (const IntPoint2 &p, const byte *r, const byte *g, const byte *b, int w, int h, bool xorMode=false, double fact=1.) |
Display color bitmap. More... | |
void | Imagine::putColorImage (int x, int y, const byte *r, const byte *g, const byte *b, const byte *a, int w, int h, bool xorMode=false, double fact=1.) |
Display color bitmap with alpha channel. More... | |
void | Imagine::putColorImage (const IntPoint2 &p, const byte *r, const byte *g, const byte *b, const byte *a, int w, int h, bool xorMode=false, double fact=1.) |
Display color bitmap with alpha channel. More... | |
void | Imagine::putGreyImage (int x, int y, const byte *g, int w, int h, bool xorMode=false, double fact=1.) |
Display grey bitmap. More... | |
void | Imagine::putGreyImage (const IntPoint2 &p, const byte *g, int w, int h, bool xorMode=false, double fact=1.) |
Display grey bitmap. More... | |
void | Imagine::putNativeBitmap (int x, int y, const NativeBitmap &bm, bool xorMode=false, double fact=1.) |
Display native bitmap. More... | |
bool | Imagine::saveAlphaColorImage (const std::string &name, Imagine::AlphaColor *cols, int w, int h, int quality=85) |
Save color image with alpha channel. More... | |
bool | Imagine::saveAlphaColorImage (const std::string &name, byte *rgba, int w, int h, int quality=85) |
Save color image with alpha channel. More... | |
bool | Imagine::saveAlphaColorImage (const std::string &name, const byte *r, const byte *g, const byte *b, const byte *a, int w, int h, int quality=85) |
Save color image with alpha channel. More... | |
bool | Imagine::saveColorImage (const std::string &name, const Color *cols, int w, int h, int quality=85) |
Save color image. More... | |
bool | Imagine::saveColorImage (const std::string &name, const byte *rgb, int w, int h, int quality=85) |
Save color image. More... | |
bool | Imagine::saveColorImage (const std::string &name, const byte *r, const byte *g, const byte *b, int w, int h, int quality=85) |
Save color image. More... | |
bool | Imagine::saveGreyImage (const std::string &name, const byte *g, int w, int h, int quality=85) |
Save grey image. More... | |
void | Imagine::setActiveWindow (Window w, int subWin=0) |
Set active window. More... | |
void | Imagine::setBackGround (const Color &col) |
Set ackground color of window. More... | |
void | Imagine::setCamera (const DoublePoint3 &pos, const DoublePoint3 &dir, const DoubleVector3 &up) |
Sets the camera pose. More... | |
void | Imagine::setLight (bool b) |
Set/unset lighting in 3D rendering. More... | |
void | Imagine::setLight (const FloatVector3 &dir, float ambient=0.2f) |
Set direction for diffuse lighting and ambient lighting in 3D rendering. More... | |
void | Imagine::setLight (float dirx, float diry, float dirz, float ambient=0.2f) |
void | Imagine::setMaskFromColor (byte *&r, byte *&g, byte *&b, byte *&a, int w, int h, const Color &col) |
Create a transparency mask from a specified color-key. More... | |
void | Imagine::setMaskFromColor (byte *&rgba, int w, int h, const Color &col) |
Create a transparency mask from a specified color-key. More... | |
void | Imagine::setMaskFromColor (AlphaColor *&acols, int w, int h, AlphaColor col) |
Create a transparency mask from a specified color-key. More... | |
void | Imagine::showMesh (const Mesh &M, bool reinitCam=true) |
Show mesh. More... | |
void | Imagine::showWindow (Window w, int subWin=0) |
Show window. More... | |
void | Imagine::unGetEvent (const Event &ev) |
Unget event. More... | |
enum Imagine::EventState |
Keyboard state when the event occured (independently on what caused the event). These are binary masks (e.g. if (state&EVS_SHIFT) {} ...)
enum Imagine::EventType |
Possible values for for Event::type. What triggered the event:
enum Imagine::KeyCode |
Codes assigned to most non alpha-numeric keys (alpha-numeric keys are represented by their ASCII code: 'A', '0'...)
Functions getKey() and anyGetKey() may return one of those. The field Event::key stores such a value.
The direction arrow keys are KEY_UP
, KEY_DOWN
, KEY_LEFT
, KEY_RIGHT
.
Modifier keys are KEY_SHIFT
, KEY_ALT
, KEY_CONTROL
, KEY_CMD
(Command key under MacOS, Windows key otherwise).
enum Imagine::WindowType |
Type of Window
int Imagine::anyClick | ( | ) |
int Imagine::anyClick | ( | Window & | win, |
int & | subWin | ||
) |
int Imagine::anyGetKey | ( | Window & | win, |
int & | subWin, | ||
bool | ignoreModifier = true |
||
) |
Waits for a key pressed in any window (see also getKey()).
win | the Window that is clicked |
subWin | subwindow index (if any) |
ignoreModifier | whether to ignore modifier keys (shift, ctrl, alt) |
'a'
instead of 'A'
.
int Imagine::anyGetMouse | ( | int & | x, |
int & | y, | ||
Window & | win, | ||
int & | subWin | ||
) |
Waits for a mouse click in any window (see also getMouse()).
x,y | Coordinates of the cliked point |
win | the Window that is clicked |
subWin | subwindow index (if any) |
Waits for a mouse click in any window (see also getMouse()).
p | Coordinates of the cliked point |
win | the Window that is clicked |
subWin | subwindow index (if any) |
Color Imagine::capturePoint | ( | int | x, |
int | y | ||
) |
Captures one pixel of the active window. Do not call for all pixels!
x,y | point to capture |
Captures one pixel of the active window. Do not call for all pixels!
p | point to capture |
void Imagine::captureRectangle | ( | int | x, |
int | y, | ||
Color * | c, | ||
int | w, | ||
int | h | ||
) |
Captures part of the active window.
x,y | top left |
c | Color array (have to be already allocated) |
w,h | dimensions |
Captures part of the active window.
p | top left |
c | Color array (have to be already allocated) |
w,h | dimensions |
void Imagine::captureRectangle | ( | int | x, |
int | y, | ||
byte * | RGB, | ||
int | w, | ||
int | h | ||
) |
Captures part of the active window.
|
inline |
Captures part of the active window.
void Imagine::captureRectangle | ( | int | x, |
int | y, | ||
byte * | R, | ||
byte * | G, | ||
byte * | B, | ||
int | w, | ||
int | h | ||
) |
Captures part of the active window.
x,y | top left |
R,G,B | RGB arrays (have to be already allocated) |
w,h | dimensions |
|
inline |
Captures part of the active window.
p | top left |
R,G,B | RGB arrays (have to be already allocated) |
w,h | dimensions |
void Imagine::captureWindow | ( | Color *& | cols, |
int & | w, | ||
int & | h | ||
) |
Captures the active window. Allocates buffers.
cols | captured array |
w,h | dimensions (note: might have changed since openWindow!) |
void Imagine::captureWindow | ( | byte *& | RGB, |
int & | w, | ||
int & | h | ||
) |
Captures the active window. Allocates buffers.
RGB | captured array |
w,h | dimensions (note: might have changed since openWindow!) |
void Imagine::captureWindow | ( | byte *& | R, |
byte *& | G, | ||
byte *& | B, | ||
int & | w, | ||
int & | h | ||
) |
Captures the active window. Allocates buffers.
R,G,B | captured RGB arrays |
w,h | dimensions (note: might have changed since openWindow!) |
void Imagine::clearWindow | ( | ) |
Clears a window.
int Imagine::click | ( | ) |
Waits for a mouse click in active window (see also anyClick()).
void Imagine::closeWindow | ( | Window | w | ) |
Closes a window. You must have stored the window handle returned by openWindow and variants.
w | the window to close |
AlphaColor* Imagine::convertColorToAlphaColor | ( | const Imagine::Color * | cols, |
int | w, | ||
int | h | ||
) |
It puts 255 to the alpha-channel for all pixels Use this funtion if you want to use setMaskFromColor on a Color Image
cols | array of Color, line after line, from top left to bottom right |
w,h | dimensions of (h lines of w pixels) // convert Color image to Color image with alpha channel Color* C1; AlphaColor* aC; aC = convertColorToAlphaColor(C1,w,h); // Add alpha Channel putAlphaColorImage(0,0,aC,w,h); // Display Image with alpha channel // ... |
void Imagine::drawArrow | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
const AlphaColor & | col, | ||
int | arrowWidth = 8 , |
||
int | arrowHeight = 5 , |
||
int | style = 0 , |
||
int | width = 1 , |
||
bool | xorMode = false |
||
) |
Draws an arrow.
x1,y1 | beginning point |
x2,y2 | end point |
col | AlphaColor or Color |
arrowWidth,arrowHeight | Tip box dimension (default 8x5) |
style | (0,1 or 2, default=0) |
width | Line width (default=1) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
|
inline |
Draws an arrow.
p1 | beginning point |
p2 | end point |
col | AlphaColor or Color |
arrowWidth,arrowHeight | Tip box dimension (default 8x5) |
style | (0,1 or 2, default=0) |
width | Line width (default=1) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
|
inline |
Draws an arrow.
x1,y1 | beginning point |
x2,y2 | end point |
col | AlphaColor or Color |
ta,tl | Tip box angle and length |
style | (0,1 or 2, default=0) |
width | Line width (default=1) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
|
inline |
Draws an arrow.
p1 | beginning point |
p2 | end point |
col | AlphaColor or Color |
ta,tl | Tip box angle and length |
style | (0,1 or 2, default=0) |
width | Line width (default=1) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::drawCircle | ( | int | xc, |
int | yc, | ||
int | r, | ||
const Color & | col, | ||
int | penWidth = 1 , |
||
bool | xorMode = false |
||
) |
Draws a circle.
xc,yc | center |
r | radius |
col | Color |
penWidth | line width (default=1) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
|
inline |
Draws a circle.
c | center |
r | radius |
col | Color |
penWidth | line width (default=1) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::drawEllipse | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
const Color & | col, | ||
int | penWidth = 1 , |
||
bool | xorMode = false |
||
) |
Draws an ellipse.
x,y | Top Left |
w,h | Dimensions |
col | Color |
penWidth | line width (default=1) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
|
inline |
Draws an ellipse.
p | Top Left |
w,h | Dimensions |
col | Color |
penWidth | line width (default=1) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::drawLine | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
const Color & | col, | ||
int | penWidth = 1 , |
||
bool | xorMode = false |
||
) |
Draws a line.
x1,y1 | First point |
x2,y2 | Second point |
col | Color |
penWidth | line width (default=1) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::drawPoint | ( | int | x, |
int | y, | ||
const Color & | col, | ||
bool | xorMode = false |
||
) |
Draws a point.
x,y | point |
col | Color |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::drawPoly | ( | const int | x[], |
const int | y[], | ||
int | n, | ||
const Color & | col, | ||
int | width = 1 , |
||
bool | xorMode = false |
||
) |
Close it, drawing a line from last point to first one.
x,y | Points positions (x[0],y[0]), ..., (x[n-1],y[n-1]) |
n | Number of points |
col | Color |
width | Line width (default=1) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::drawPoly | ( | const IntPoint2 * | p, |
int | n, | ||
const Color & | col, | ||
int | width = 1 , |
||
bool | xorMode = false |
||
) |
Draws a polygon. Close it, drawing a line from last point to first one.
p | Points positions |
n | Number of points |
col | Color |
width | Line width (default=1) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
|
inline |
Draws a polygon. Close it, drawing a line from last point to first one.
xy | Points positions (one array points are (xy[0],xy[1]), (xy[2],xy[3]) ... |
n | Number of points |
col | Color |
width | Line width (default=1) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::drawRect | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
const Color & | col, | ||
int | penWidth = 1 , |
||
bool | xorMode = false |
||
) |
Draws a rectangle.
x,y | Top Left |
w,h | Dimensions |
col | Color |
penWidth | line width (default=1) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::drawString | ( | int | x, |
int | y, | ||
const std::string & | s, | ||
const AlphaColor & | col, | ||
int | fontSize = 12 , |
||
double | alpha = 0 , |
||
bool | italic = false , |
||
bool | bold = false , |
||
bool | underlined = false , |
||
bool | xorMode = false |
||
) |
Draws a string. NB: xorMode does not work!
x,y | Position (first char) |
s | String |
col | AlphaColor or Color |
fontSize | size (default=12) (NB: cannot choose font yet) |
alpha | Angle (default=0=horizontal) |
italic,bold,underlined | style (default=no) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
|
inline |
Draws a string. NB: xorMode does not work!
p | Position (first char) |
s | String |
col | AlphaColor or Color |
fontSize | size (default=12) (NB: cannot choose font yet) |
alpha | Angle (default=0=horizontal) |
italic,bold,underlined | style (default=no) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::enableMouseTracking | ( | bool | en | ) |
If mouse tracking is disabled (the default), the active window only receives mouse move events when at least one mouse button is pressed while the mouse is being moved. If mouse tracking is enabled, the widget receives mouse move events even if no buttons are pressed.
void Imagine::endGraphics | ( | ) |
If there is an open window, it waits for a mouse click before exiting.
void Imagine::fillCircle | ( | int | xc, |
int | yc, | ||
int | r, | ||
const AlphaColor & | col, | ||
bool | xorMode = false |
||
) |
Fills a circle.
xc,yc | center |
r | radius |
col | AlphaColor or Color |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
|
inline |
Fills a circle.
c | center |
r | radius |
col | AlphaColor or Color |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::fillEllipse | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
const AlphaColor & | col, | ||
bool | xorMode = false |
||
) |
Fills an ellipse.
x,y | Top Left |
w,h | Dimensions |
col | AlphaColor or Color |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
|
inline |
Fills an ellipse.
p | Top Left |
w,h | Dimensions |
col | AlphaColor or Color |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::fillPoly | ( | const int | x[], |
const int | y[], | ||
int | n, | ||
const AlphaColor & | col, | ||
bool | xorMode = false |
||
) |
Draws a filled polygon. Close it, from last point to first one.
x,y | Points positions (x[0],y[0]), ..., (x[n-1],y[n-1]) |
n | Number of points |
col | AlphaColor or Color |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::fillPoly | ( | const IntPoint2 * | p, |
int | n, | ||
const AlphaColor & | col, | ||
bool | xorMode = false |
||
) |
Draws a filled polygon. Close it, from last point to first one.
p | Points positions |
n | Number of points |
col | AlphaColor or Color |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::fillPoly | ( | const int | xy[], |
int | n, | ||
const AlphaColor & | col, | ||
bool | xorMode = false |
||
) |
Draws a filled polygon. Close it, from last point to first one.
xy | Points positions (one array points are (xy[0],xy[1]), (xy[2],xy[3]) ... |
n | Number of points |
col | AlphaColor or Color |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
void Imagine::fillRect | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
const AlphaColor & | col, | ||
bool | xorMode = false |
||
) |
Fills a rectangle.
x,y | Top Left |
w,h | Dimensions |
col | AlphaColor or Color |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
|
inline |
void Imagine::flushEvents | ( | ) |
Flush the event queue.
See this page for usage: Handling events
void Imagine::getEvent | ( | int | ms, |
Event & | ev | ||
) |
Get next event in queue. Wait for around ms milliseconds before timeout.
ms | Number of milliseconds before timeout. ms=-1: no wait limit. |
ev | The event. If timeout, ev.type is EVT_NONE. |
See this page for usage: Handling events
ev.key
, such as 'a'
instead of 'A'
.
int Imagine::getKey | ( | bool | ignoreModifier = true | ) |
Waits for a key pressed in active window (see also anyGetKey()).
ignoreModifier | whether to ignore modifier keys (shift, ctrl, alt) |
'a'
instead of 'A'
.
int Imagine::getMouse | ( | int & | x, |
int & | y | ||
) |
Waits for a mouse click in active window (see setActiveWindow()).
x,y | Coordinates of the cliked point |
|
inline |
Waits for a mouse click in active window (see setActiveWindow()).
p | The cliked point |
void Imagine::hideMesh | ( | const Mesh & | M, |
bool | reinitCam = true |
||
) |
Removes a mesh from active window (must be a 3D window).
M | Mesh to hide |
reinitCam | Reset camera to fit all the meshes being viewed |
Function only available if your version of Imagine++ was built with OpenGL support. The preprocessor macro IMAGINE_OPENGL indicates that, see file Imagine/Graphics/ConfigGraphics.h
bool Imagine::loadAlphaColorImage | ( | const std::string & | name, |
AlphaColor *& | acols, | ||
int & | w, | ||
int & | h | ||
) |
Loads and allocates a color image from a file.
name | file name |
acols | AlphaColor array (see putAlphaColorImage()) |
w,h | dimensions |
bool Imagine::loadAlphaColorImage | ( | const std::string & | name, |
byte *& | rgba, | ||
int & | w, | ||
int & | h | ||
) |
Loads and allocates a color image from a file.
name | file name |
rgba | array (see putAlphaColorImage()) |
w,h | dimensions |
bool Imagine::loadColorImage | ( | const std::string & | name, |
Color *& | cols, | ||
int & | w, | ||
int & | h | ||
) |
Loads and allocates a color image from a file.
name | file name |
cols | Color array (see putColorImage()) |
w,h | dimensions |
bool Imagine::loadColorImage | ( | const std::string & | name, |
byte *& | rgb, | ||
int & | w, | ||
int & | h | ||
) |
Loads and allocates a color image from a file.
name | file name |
rgb | array (see putColorImage()) |
w,h | dimensions |
bool Imagine::loadColorImage | ( | const std::string & | name, |
byte *& | r, | ||
byte *& | g, | ||
byte *& | b, | ||
int & | w, | ||
int & | h | ||
) |
Loads and allocates a color image from a file.
name | file name |
r,g,b | arrays (see putColorImage()) |
w,h | dimensions |
bool Imagine::loadColorImage | ( | const std::string & | name, |
byte *& | r, | ||
byte *& | g, | ||
byte *& | b, | ||
byte *& | a, | ||
int & | w, | ||
int & | h | ||
) |
Loads and allocates a color image from a file.
name | file name |
r,g,b,a | arrays (see putAlphaColorImage()) |
w,h | dimensions |
bool Imagine::loadGreyImage | ( | const std::string & | name, |
byte *& | g, | ||
int & | w, | ||
int & | h | ||
) |
Loads and allocates a grey image from a file.
name | file name |
g | array (see putGreyImage()) |
w,h | dimensions |
void Imagine::milliSleep | ( | int | msec | ) |
Pause program for a certain period. Waits for (approximately!) msec milliseconds, then return.
msec | number of milliseconds |
void Imagine::noRefreshBegin | ( | ) |
To draw faster, stop refreshing 2D drawings. They are buffered until noRefreshEnd() is called.
void Imagine::noRefreshEnd | ( | ) |
Ends a section started with noRefreshBegin().
|
inline |
Ends a section started with noRefreshPush()
|
inline |
To draw faster, stop refreshing 2D drawings. They are buffered until corresponding noRefreshPop() is called. Push and pop might be recursively included.
Window Imagine::openComplexWindow | ( | int | w, |
int | h, | ||
const std::string & | name = "Imagine++" , |
||
int | tabsNb = 1 , |
||
const std::string * | tabsNames = 0 , |
||
const WindowType * | tabsTypes = 0 , |
||
int | x = -1 , |
||
int | y = -1 |
||
) |
Creates and opens a complex window with tabsNb tabs. If no other window or complex window is opened, first tab becomes the active window
w,h | size |
name | windowTitle title (default="Imagine++") |
tabsNb | number of tabs |
tabsNames | titles of tabs (can be null array) |
tabsTypes | types of tabs (WINDOW_2D or WINDOW_3D). This can be the null array, in which case all windows are 2D. |
x,y | screen position (default=let OS choose) |
Window Imagine::openWindow | ( | int | w, |
int | h, | ||
const std::string & | windowTitle = "Imagine++" , |
||
int | x = -1 , |
||
int | y = -1 |
||
) |
Creates and opens a window. If another window is already open, the new one does not get the painting orders yet, call setActiveWindow for that. If no other window is opened, no need to call setActiveWindow. If you are interested in a single window, you do not need to store the result in a variable.
w,h | size |
windowTitle | title (default="Imagine++") |
x,y | screen position (default=let OS choose) |
Window Imagine::openWindow3D | ( | int | w, |
int | h, | ||
const std::string & | windowTitle = "Imagine++" , |
||
int | x = -1 , |
||
int | y = -1 |
||
) |
Creates and opens a window. If no other window is opened, becomes the active window
w,h | size |
windowTitle | title (default="Imagine++") |
x,y | screen position (default=let OS choose) |
void Imagine::putAlphaColorImage | ( | int | x, |
int | y, | ||
Imagine::AlphaColor * | cols, | ||
int | w, | ||
int | h, | ||
bool | xorMode = false , |
||
double | fact = 1. |
||
) |
Displays a color bitmap. AlphaColor array.
x,y | top left position of bitmap in window |
cols | array of AlphaColor, line after line, from top left to bottom right |
w,h | dimensions (h lines of w pixels) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
void Imagine::putAlphaColorImage | ( | int | x, |
int | y, | ||
byte * | rgba, | ||
int | w, | ||
int | h, | ||
bool | xorMode = false , |
||
double | fact = 1. |
||
) |
Displays a color bitmap. 1 rgba array.
x,y | top left position of bitmap in window |
rgba | array of values, line after line, from top left to bottom right: {r(0,0),g(0,0),b(0,0),a(0,0),r(1,0),g(1,0),b(1,0),b(1,0),...} |
w,h | dimensions (h lines of w pixels) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
void Imagine::putAlphaColorImage | ( | const IntPoint2 & | p, |
byte * | rgba, | ||
int | w, | ||
int | h, | ||
bool | xorMode = false , |
||
double | fact = 1. |
||
) |
Displays a color bitmap. 1 rgba array.
p | top left position of bitmap in window |
rgba | array of values, line after line, from top left to bottom right: {r(0,0),g(0,0),b(0,0),a(0,0),r(1,0),g(1,0),b(1,0),b(1,0),...} |
w,h | dimensions (h lines of w pixels) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
void Imagine::putColorImage | ( | int | x, |
int | y, | ||
const Color * | cols, | ||
int | w, | ||
int | h, | ||
bool | xorMode = false , |
||
double | fact = 1. |
||
) |
Displays a color bitmap. Color array.
x,y | top left position of bitmap in window |
cols | array of Color, line after line, from top left to bottom right |
w,h | dimensions (h lines of w pixels) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
|
inline |
Displays a color bitmap. Color array.
p | top left position of bitmap in window |
cols | array of Color, line after line, from top left to bottom right |
w,h | dimensions (h lines of w pixels) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
void Imagine::putColorImage | ( | int | x, |
int | y, | ||
const byte * | rgb, | ||
int | w, | ||
int | h, | ||
bool | xorMode = false , |
||
double | fact = 1. |
||
) |
Displays a color bitmap. 1 rgb array.
x,y | top left position of bitmap in window |
rgb | array of values, line after line, from top left to bottom right: {r(0,0),g(0,0),b(0,0),r(1,0),g(1,0),b(1,0),...} |
w,h | dimensions (h lines of w pixels) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
|
inline |
Displays a color bitmap. 1 rgb array.
p | top left position of bitmap in window |
rgb | array of values, line after line, from top left to bottom right: {r(0,0),g(0,0),b(0,0),r(1,0),g(1,0),b(1,0),...} |
w,h | dimensions (h lines of w pixels) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
void Imagine::putColorImage | ( | int | x, |
int | y, | ||
const byte * | r, | ||
const byte * | g, | ||
const byte * | b, | ||
int | w, | ||
int | h, | ||
bool | xorMode = false , |
||
double | fact = 1. |
||
) |
Displays a color bitmap. 3 arrays.
x,y | top left position of bitmap in window |
r,g,b | arrays of RED/GREEN/BLUE values (0-255), line after line, from top left to bottom right |
w,h | dimensions (h lines of w pixels) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
|
inline |
Displays a color bitmap. 3 arrays.
p | top left position of bitmap in window |
r,g,b | arrays of RED/GREEN/BLUE values (0-255), line after line, from top left to bottom right |
w,h | dimensions (h lines of w pixels) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
void Imagine::putColorImage | ( | int | x, |
int | y, | ||
const byte * | r, | ||
const byte * | g, | ||
const byte * | b, | ||
const byte * | a, | ||
int | w, | ||
int | h, | ||
bool | xorMode = false , |
||
double | fact = 1. |
||
) |
Displays a color bitmap. 4 arrays.
x,y | top left position of bitmap in window |
r,g,b,a | arrays of RED/GREEN/BLUE/ALPHA values (0-255), line after line, from top left to bottom right |
w,h | dimensions (h lines of w pixels) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
|
inline |
Displays a color bitmap. 4 arrays.
p | top left position of bitmap in window |
r,g,b,a | arrays of RED/GREEN/BLUE/ALPHA values (0-255), line after line, from top left to bottom right |
w,h | dimensions (h lines of w pixels) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
void Imagine::putGreyImage | ( | int | x, |
int | y, | ||
const byte * | g, | ||
int | w, | ||
int | h, | ||
bool | xorMode = false , |
||
double | fact = 1. |
||
) |
Displays a grey bitmap.
x,y | top left position of bitmap in window |
g | array of grey values between 0 and 255, line after line, from top left to bottom right |
w,h | dimensions (h lines of w pixels) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
|
inline |
Displays a grey bitmap.
p | top left position of bitmap in window |
g | array of grey values between 0 and 255, line after line, from top left to bottom right |
w,h | dimensions (h lines of w pixels) |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
void Imagine::putNativeBitmap | ( | int | x, |
int | y, | ||
const NativeBitmap & | bm, | ||
bool | xorMode = false , |
||
double | fact = 1. |
||
) |
Displays native bitmap into active window
x,y | drawing position (top left in window) |
bm | the native bitmap to display |
xorMode | XOR drawing (default=off). Used twice, recovers the original content |
fact | scaling factor (default=1.) |
bool Imagine::saveAlphaColorImage | ( | const std::string & | name, |
Imagine::AlphaColor * | cols, | ||
int | w, | ||
int | h, | ||
int | quality = 85 |
||
) |
Saves a color image into a file.
name | file name |
cols | array (see putAlphaColorImage()) |
w,h | dimensions |
quality | Jpeg quality (between 0 and 100) |
bool Imagine::saveAlphaColorImage | ( | const std::string & | name, |
byte * | rgba, | ||
int | w, | ||
int | h, | ||
int | quality = 85 |
||
) |
Saves a color image into a file.
name | file name |
rgba | array (see putAlphaColorImage()) |
w,h | dimensions |
quality | Jpeg quality (between 0 and 100) |
bool Imagine::saveAlphaColorImage | ( | const std::string & | name, |
const byte * | r, | ||
const byte * | g, | ||
const byte * | b, | ||
const byte * | a, | ||
int | w, | ||
int | h, | ||
int | quality = 85 |
||
) |
Saves a color image into a file.
name | file name |
r,g,b,a | arrays (see putColorImage()) |
w,h | dimensions |
quality | Jpeg quality (between 0 and 100) |
bool Imagine::saveColorImage | ( | const std::string & | name, |
const Color * | cols, | ||
int | w, | ||
int | h, | ||
int | quality = 85 |
||
) |
Saves a color image into a file.
name | file name |
cols | array (see putColorImage()) |
w,h | dimensions |
quality | Jpeg quality (between 0 and 100) |
bool Imagine::saveColorImage | ( | const std::string & | name, |
const byte * | rgb, | ||
int | w, | ||
int | h, | ||
int | quality = 85 |
||
) |
Saves a color image into a file.
name | file name |
rgb | array (see putColorImage()) |
w,h | dimensions |
quality | Jpeg quality (between 0 and 100) |
bool Imagine::saveColorImage | ( | const std::string & | name, |
const byte * | r, | ||
const byte * | g, | ||
const byte * | b, | ||
int | w, | ||
int | h, | ||
int | quality = 85 |
||
) |
Saves a color image into a file.
name | file name |
r,g,b | arrays (see putColorImage()) |
w,h | dimensions |
quality | Jpeg quality (between 0 and 100) |
bool Imagine::saveGreyImage | ( | const std::string & | name, |
const byte * | g, | ||
int | w, | ||
int | h, | ||
int | quality = 85 |
||
) |
Saves a grey image into a file.
name | file name |
g | array (see putGreyImage()) |
w,h | dimensions |
quality | Jpeg quality (between 0 and 100) |
void Imagine::setActiveWindow | ( | Window | w, |
int | subWin = 0 |
||
) |
Sets the active tab into given ComplexWindow, i.e. the one that will get the next drawing commands.
w | Window handle |
subWin | tab index |
void Imagine::setBackGround | ( | const Color & | col | ) |
Sets window background (for 2D and 3D graphics).
col | Background Color |
void Imagine::setCamera | ( | const DoublePoint3 & | pos, |
const DoublePoint3 & | dir, | ||
const DoubleVector3 & | up | ||
) |
pos | where the camera is |
dir | where the camera is looking at, relative to pos |
up | the up direction |
void Imagine::setLight | ( | bool | b | ) |
The default diffuse light has direction z, the viewing direction.
void Imagine::setLight | ( | const FloatVector3 & | dir, |
float | ambient = 0.2f |
||
) |
The direction vector is automatically normalized, but putting a null vector indicates no lighting (and ambient is indifferent).
void Imagine::setLight | ( | float | dirx, |
float | diry, | ||
float | dirz, | ||
float | ambient = 0.2f |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void Imagine::setMaskFromColor | ( | byte *& | r, |
byte *& | g, | ||
byte *& | b, | ||
byte *& | a, | ||
int | w, | ||
int | h, | ||
const Color & | col | ||
) |
It puts the value 0 to the alpha-channel for all pixels which contain the color you want to hide. In other words, the Color col becomes invisible
r,g,b,a | arrays of RED/GREEN/BLUE/ALPHA values (0-255), line after line, from top left to bottom right |
w,h | dimensions (h lines of w pixels) |
col | color that is about to be hidden /// // create mask from a color loadColorImage(srcPath("ryu.gif"), r, g, b, a, w1, h1); // Load color with alpha channel (for transparency, using PNG or GIF is better) cout << "First Mask" << endl; putColorImage(0,0,r,g,b,a,w1,h1); // Display Image with alpha channel click(); // ... |
void Imagine::setMaskFromColor | ( | byte *& | rgba, |
int | w, | ||
int | h, | ||
const Color & | col | ||
) |
It puts the value 0 to the alpha-channel for all pixels which contain the color you want to hide. In other words, the Color col becomes invisible
rgba | array of values, line after line, from top left to bottom right: {r(0,0),g(0,0),b(0,0),a(0,0),r(1,0),g(1,0),b(1,0),a(1,0),...} |
w,h | dimensions (h lines of w pixels) |
col | color that is about to be hidden // create a mask from a color (rgba array) saveAlphaColorImage("ruy.png", RGBA, w1, h1); // Save Image to PNG without background color (ie. with transparency) putAlphaColorImage(0,0,RGBA1,w,h); // Display Image with an alpha channel // ... |
void Imagine::setMaskFromColor | ( | AlphaColor *& | acols, |
int | w, | ||
int | h, | ||
AlphaColor | col | ||
) |
It puts the value 0 to the alpha-channel for all pixels which contain the color you want to hide. In other words, the Color col becomes invisible
acols | array of AlphaColor, line after line, from top left to bottom right |
w,h | dimensions (h lines of w pixels) |
col | color that is about to be hidden // create a mask from a color (AlphaColor array) AlphaColor *C; cout << "2nd Mask for AlphaColor" << endl; putAlphaColorImage(0,0,C,w,h); // Display Image with an alpha channel click(); // ... |
void Imagine::showMesh | ( | const Mesh & | M, |
bool | reinitCam = true |
||
) |
Shows a mesh in active window (must be a 3D window).
M | Mesh to show |
reinitCam | Reset camera to view all meshes (same as SHIFT-r) |
IMPORTANT NOTE:
Function only available if your version of Imagine++ was built with OpenGL support. The preprocessor macro IMAGINE_OPENGL indicates that, see file Imagine/Graphics/ConfigGraphics.h
void Imagine::showWindow | ( | Window | w, |
int | subWin = 0 |
||
) |
Brings a window to front and sets it active.
w | Window handle |
subWin | subwindow number (optional) |
void Imagine::unGetEvent | ( | const Event & | ev | ) |
Push back event at end of queue.
ev | The event. |
See this page for usage: Handling events