Go to the documentation of this file.
26 GLfloat worldRotation[4];
27 GLfloat cameraRotation[4];
31 GLdouble left, right,
top, bottom, near, far;
220 const char *_param,
const char *_desc)
335 void RunHOGGUI(
int argc,
char* argv[],
int windowDimension = 1000);
336 void RunHOGGUI(
int argc,
char* argv[],
int xDimension,
int yDimension);
338 void SaveScreenshot(
unsigned long windowID,
const char *filename);
339 void SetZoom(
int windowID,
float amount);
349 void cameraLookAt(GLfloat, GLfloat, GLfloat,
float cameraSpeed = 0.1,
int port = -1);
351 void cameraMoveTo(GLfloat x, GLfloat y, GLfloat z,
float cameraSpeed = 0.1,
int port = -1);
352 void cameraOffset(GLfloat x, GLfloat y, GLfloat z,
float cameraSpeed = 0.1,
int port = -1);
357 void GetHeading(
unsigned long windowID,
int which, GLdouble &hx, GLdouble &hy, GLdouble &hz);
void PrintCommandLineArguments()
mouseCallbackData2(MouseCallback2 _mC, tMouseEventType _which)
mouseCallbackData(MouseCallback _mC, tMouseEventType _which)
void RemoveJoystickHandler(JoystickCallback jC, void *userdata)
GLfloat gTrackBallRotation[4]
A generic vector (essentially the same as a point, but offers normalization)
float GlobalHOGToViewportX(float x, int v)
void RemoveFrameHandler(FrameCallback jC, unsigned long windowID, void *userdata)
windowCallbackData(WindowCallback _wC)
void updateProjection(pRecContext pContextInfo, int viewPort=-1)
Update the projection matrix based on camera and view info.
void updateModelView(pRecContext pContextInfo, int currPort)
Updates the viewpoint of the model.
void(* JoystickCallback)(unsigned long windowID, double offsetX, double offsetY, void *)
a joystaick callback handler is passed the same data passed in when it was installed
viewport viewports[MAXPORTS]
recCamera camera[MAXPORTS]
keyboardCallbackData(KeyboardCallback kc, const char *_title, const char *_desc, tKeyboardModifier _mod, keyboardCallbackData *_next=0)
frameCallbackData(FrameCallback _glCall, unsigned long _windowID, void *_userData)
bool(* MouseCallback)(unsigned long windowID, int x, int y, point3d loc, tButtonType, tMouseEventType)
a mouse callback handler passes the absolute and local mouse coordinates of the click returns true if...
int GetActivePort(unsigned long windowID)
void InstallKeyboardHandler(KeyboardCallback kf, const char *title, const char *description, tKeyboardModifier mod, unsigned char firstKey, unsigned char lastKey=0)
Graphics::point ViewportToGlobalHOG(Graphics::point where, int viewport)
commandLineCallbackData(CommandLineCallback _CLC, const char *_argument, const char *_param, const char *_desc)
void MoveViewport(unsigned long windowID, int viewport, const Graphics::rect &newLocation)
Graphics::Display display
pRecContext getCurrentContext()
void InstallWindowHandler(WindowCallback wC)
void ProcessCommandLineArgs(int argc, char *argv[])
void InstallFrameHandler(FrameCallback jC, unsigned long windowID, void *userdata)
bool(* MouseCallback2)(unsigned long windowID, int viewport, int x, int y, point3d loc, tButtonType, tMouseEventType)
the new callback handler also passes the viewport frame in which the click occured.
keyboardCallbackData * next
void drawGL(pRecContext pContextInfo, bool swap)
void(* FrameCallback)(unsigned long windowID, unsigned int viewport, void *)
install a FrameCallback to be called once per frame and viewport This is where you should do any draw...
void SetActivePort(unsigned long windowID, int which)
pRecContext gTrackingContextInfo
void submitTextToBuffer(const char *val)
struct recContext * pRecContext
void appendTextToBuffer(const char *)
void resetCamera(recCamera *pCamera)
void InstallCommandLineHandler(CommandLineCallback, const char *, const char *, const char *)
void(* WindowCallback)(unsigned long windowID, tWindowEventType)
a window callback handler called when a window is created or destroyed
void GetKeyAssignments(std::vector< char > &keys)
void SetZoom(int windowID, float amount)
recVec cameraLookingAt(int port=-1)
void GetKeyAssignmentDescriptions(std::vector< std::string > &keys)
bool HandleMouseClick(pRecContext pContextInfo, int x, int y, point3d where, tButtonType, tMouseEventType)
bool DoKeyboardCommand(pRecContext pContextInfo, unsigned char keyHit, bool shift, bool cntrl, bool alt)
void RemoveWindowHandler(WindowCallback wC)
void InstallMouseClickHandler(MouseCallback mC, tMouseEventType which=static_cast< tMouseEventType >(kMouseDown|kMouseUp|kMouseDrag))
int GetNumPorts(unsigned long windowID)
void SetNumPorts(unsigned long windowID, int count)
void setViewport(pRecContext pContextInfo, int currPort)
void cameraMoveTo(GLfloat x, GLfloat y, GLfloat z, float cameraSpeed=0.1, int port=-1)
void setTextBufferVisibility(bool)
const char * getTextBuffer()
void setPortCamera(pRecContext pContextInfo, int currPort)
void RunHOGGUI(int argc, char *argv[], int windowDimension=1000)
int AddViewport(unsigned long windowID, const Graphics::rect &r, viewportType v)
void(* KeyboardCallback)(unsigned long windowID, tKeyboardModifier, char)
a keyboard callback handler is passed the current unit simulation, the key that was hit,...
void ReinitViewports(unsigned long windowID, const Graphics::rect &r, viewportType v)
int(* CommandLineCallback)(char **, int)
A command-line callback handler takes in a char** which points to the argument which matches the argu...
void initialConditions(pRecContext pContextInfo)
void PrintKeyboardAssignments()
void HandleJoystickMovement(pRecContext pContextInfo, double panX, double panY)
joystickCallbackData(JoystickCallback _jC, void *_userData)
void SaveScreenshot(unsigned long windowID, const char *filename)
void swap(uint64_t &state, int loc1, int loc2)
bool HandleMouse(pRecContext pContextInfo, point3d where, tButtonType button, tMouseEventType mouse)
Graphics::rect finalBound
recVec GetHeading(unsigned long windowID, int which)
void RemoveMouseClickHandler(MouseCallback mC)
void cameraOffset(GLfloat x, GLfloat y, GLfloat z, float cameraSpeed=0.1, int port=-1)
void cameraLookAt(GLfloat, GLfloat, GLfloat, float cameraSpeed=0.1, int port=-1)
Graphics::point GlobalHOGToViewport(pRecContext pContextInfo, const viewport &v, Graphics::point where)
void InstallJoystickHandler(JoystickCallback jC, void *userdata)
float ViewportToGlobalHOGX(float x, int v)
pRecContext GetContext(unsigned long windowID)
void HandleWindowEvent(pRecContext pContextInfo, tWindowEventType)
bool moveAllPortsTogether
bool getTextBufferVisibility()
void HandleFrame(pRecContext pContextInfo, int viewport)