Tissue Forge C 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfC_system.h
Go to the documentation of this file.
1/*******************************************************************************
2 * This file is part of Tissue Forge.
3 * Copyright (c) 2022-2024 T.J. Sego
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 ******************************************************************************/
19
25#ifndef _WRAPS_C_TFC_SYSTEM_H_
26#define _WRAPS_C_TFC_SYSTEM_H_
27
28#include "tf_port_c.h"
29
30
32// Module functions //
34
35
43CAPI_FUNC(HRESULT) tfSystem_imageData(char **imgData, size_t *imgSize);
44
51CAPI_FUNC(HRESULT) tfSystem_screenshot(const char *filePath);
52
61CAPI_FUNC(HRESULT) tfSystem_screenshotS(const char *filePath, bool decorate, float *bgcolor);
62
68CAPI_FUNC(HRESULT) tfSystem_contextHasCurrent(bool *current);
69
75CAPI_FUNC(HRESULT) tfSystem_contextMakeCurrent();
76
82CAPI_FUNC(HRESULT) tfSystem_contextRelease();
83
89CAPI_FUNC(bool) tfSystem_cameraIsLagging();
90
96CAPI_FUNC(HRESULT) tfSystem_cameraEnableLagging();
97
103CAPI_FUNC(HRESULT) tfSystem_cameraDisableLagging();
104
110CAPI_FUNC(HRESULT) tfSystem_cameraToggleLagging();
111
117CAPI_FUNC(float) tfSystem_cameraGetLagging();
118
124CAPI_FUNC(HRESULT) tfSystem_cameraSetLagging(float lagging);
125
134CAPI_FUNC(HRESULT) tfSystem_cameraMoveTo(float *eye, float *center, float *up);
135
144CAPI_FUNC(HRESULT) tfSystem_cameraMoveToR(float *center, float *rotation, float zoom);
145
151CAPI_FUNC(HRESULT) tfSystem_cameraViewBottom();
152
158CAPI_FUNC(HRESULT) tfSystem_cameraViewTop();
159
165CAPI_FUNC(HRESULT) tfSystem_cameraViewLeft();
166
172CAPI_FUNC(HRESULT) tfSystem_cameraViewRight();
173
179CAPI_FUNC(HRESULT) tfSystem_cameraViewBack();
180
186CAPI_FUNC(HRESULT) tfSystem_cameraViewFront();
187
193CAPI_FUNC(HRESULT) tfSystem_cameraReset();
194
202CAPI_FUNC(HRESULT) tfSystem_cameraRotateMouse(int x, int y);
203
211CAPI_FUNC(HRESULT) tfSystem_cameraTranslateMouse(int x, int y);
212
218CAPI_FUNC(HRESULT) tfSystem_cameraTranslateDown();
219
225CAPI_FUNC(HRESULT) tfSystem_cameraTranslateUp();
226
232CAPI_FUNC(HRESULT) tfSystem_cameraTranslateRight();
233
239CAPI_FUNC(HRESULT) tfSystem_cameraTranslateLeft();
240
247
254
260CAPI_FUNC(HRESULT) tfSystem_cameraRotateDown();
261
267CAPI_FUNC(HRESULT) tfSystem_cameraRotateUp();
268
274CAPI_FUNC(HRESULT) tfSystem_cameraRotateLeft();
275
281CAPI_FUNC(HRESULT) tfSystem_cameraRotateRight();
282
288CAPI_FUNC(HRESULT) tfSystem_cameraRollLeft();
289
295CAPI_FUNC(HRESULT) tfSystem_cameraRollRight();
296
302CAPI_FUNC(HRESULT) tfSystem_cameraZoomIn();
303
309CAPI_FUNC(HRESULT) tfSystem_cameraZoomOut();
310
318CAPI_FUNC(HRESULT) tfSystem_cameraInitMouse(int x, int y);
319
329CAPI_FUNC(HRESULT) tfSystem_cameraTranslateBy(float x, float y);
330
339CAPI_FUNC(HRESULT) tfSystem_cameraZoomBy(float delta);
340
347CAPI_FUNC(HRESULT) tfSystem_cameraZoomTo(float distance);
348
358CAPI_FUNC(HRESULT) tfSystem_cameraRotateToAxis(float *axis, float distance);
359
368CAPI_FUNC(HRESULT) tfSystem_cameraRotateToEulerAngle(float *angles);
369
378CAPI_FUNC(HRESULT) tfSystem_cameraRotateByEulerAngle(float *angles);
379
386CAPI_FUNC(HRESULT) tfSystem_cameraCenter(float **center);
387
394CAPI_FUNC(HRESULT) tfSystem_cameraRotation(float **rotation);
395
402CAPI_FUNC(HRESULT) tfSystem_cameraZoom(float *zoom);
403
405CAPI_FUNC(HRESULT) tfSystem_getRendering3DBonds(bool *flag);
406
408CAPI_FUNC(HRESULT) tfSystem_setRendering3DBonds(bool flag);
409
412
414CAPI_FUNC(HRESULT) tfSystem_getRendering3DAngles(bool *flag);
415
417CAPI_FUNC(HRESULT) tfSystem_setRendering3DAngles(bool flag);
418
421
423CAPI_FUNC(HRESULT) tfSystem_getRendering3DDihedrals(bool *flag);
424
426CAPI_FUNC(HRESULT) tfSystem_setRendering3DDihedrals(bool flag);
427
430
432CAPI_FUNC(HRESULT) tfSystem_setRendering3DAll(bool flag);
433
435CAPI_FUNC(HRESULT) tfSystem_toggleRendering3DAll();
436
438CAPI_FUNC(HRESULT) tfSystem_getLineWidth(tfFloatP_t *lineWidth);
439
441CAPI_FUNC(HRESULT) tfSystem_setLineWidth(tfFloatP_t lineWidth);
442
444CAPI_FUNC(HRESULT) tfSystem_getLineWidthMin(tfFloatP_t *lineWidth);
445
447CAPI_FUNC(HRESULT) tfSystem_getLineWidthMax(tfFloatP_t *lineWidth);
448
455CAPI_FUNC(HRESULT) tfSystem_getAmbientColor(float **color);
456
463CAPI_FUNC(HRESULT) tfSystem_setAmbientColor(float *color);
464
471CAPI_FUNC(HRESULT) tfSystem_getDiffuseColor(float **color);
472
479CAPI_FUNC(HRESULT) tfSystem_setDiffuseColor(float *color);
480
487CAPI_FUNC(HRESULT) tfSystem_getSpecularColor(float **color);
488
495CAPI_FUNC(HRESULT) tfSystem_setSpecularColor(float *color);
496
503CAPI_FUNC(HRESULT) tfSystem_getShininess(float *shininess);
504
511CAPI_FUNC(HRESULT) tfSystem_setShininess(float shininess);
512
519CAPI_FUNC(HRESULT) tfSystem_getGridColor(float **color);
520
527CAPI_FUNC(HRESULT) tfSystem_setGridColor(float *color);
528
535CAPI_FUNC(HRESULT) tfSystem_getSceneBoxColor(float **color);
536
543CAPI_FUNC(HRESULT) tfSystem_setSceneBoxColor(float *color);
544
551CAPI_FUNC(HRESULT) tfSystem_getLightDirection(float **lightDir);
552
559CAPI_FUNC(HRESULT) tfSystem_setLightDirection(float *lightDir);
560
567CAPI_FUNC(HRESULT) tfSystem_getLightColor(float **color);
568
575CAPI_FUNC(HRESULT) tfSystem_setLightColor(float *color);
576
583CAPI_FUNC(HRESULT) tfSystem_getBackgroundColor(float **color);
584
591CAPI_FUNC(HRESULT) tfSystem_setBackgroundColor(float *color);
592
599CAPI_FUNC(HRESULT) tfSystem_decorated(bool *decorated);
600
607CAPI_FUNC(HRESULT) tfSystem_decorateScene(bool decorate);
608
615CAPI_FUNC(HRESULT) tfSystem_showingDiscretization(bool *showing);
616
623CAPI_FUNC(HRESULT) tfSystem_showDiscretization(bool show);
624
631CAPI_FUNC(HRESULT) tfSystem_getDiscretizationColor(float **color);
632
639CAPI_FUNC(HRESULT) tfSystem_setDiscretizationColor(float *color);
640
648CAPI_FUNC(HRESULT) tfSystem_viewReshape(int sizex, int sizey);
649
658CAPI_FUNC(HRESULT) tfSystem_getCPUInfo(char ***names, bool **flags, unsigned int *numNames);
659
667CAPI_FUNC(HRESULT) tfSystem_getCompileFlags(char ***flags, unsigned int *numFlags);
668
677CAPI_FUNC(HRESULT) tfSystem_getGLInfo(char ***names, char ***values, unsigned int *numNames);
678
686CAPI_FUNC(HRESULT) tfSystem_getEGLInfo(char **info, unsigned int *numChars);
687
688#endif // _WRAPS_C_TFC_SYSTEM_H_
HRESULT tfSystem_cameraDisableLagging()
Disable camera lagging.
HRESULT tfSystem_cameraRotateMouse(int x, int y)
Rotate the camera from the previous (screen) mouse position to the current (screen) position.
HRESULT tfSystem_getLightColor(float **color)
Get the light color.
HRESULT tfSystem_screenshot(const char *filePath)
Save a screenshot of the current scene.
HRESULT tfSystem_cameraRotateByEulerAngle(float *angles)
Rotate the camera by a set of Euler angles.
HRESULT tfSystem_getBackgroundColor(float **color)
Get the background color.
HRESULT tfSystem_cameraViewBottom()
Move the camera to view the domain from the bottm.
HRESULT tfSystem_cameraViewLeft()
Move the camera to view the domain from the left.
HRESULT tfSystem_toggleRendering3DAll()
HRESULT tfSystem_cameraViewBack()
Move the camera to view the domain from the back.
HRESULT tfSystem_setLightDirection(float *lightDir)
Set the light direction.
HRESULT tfSystem_contextHasCurrent(bool *current)
Test whether the context is current.
HRESULT tfSystem_cameraToggleLagging()
Toggle camera lagging.
HRESULT tfSystem_getShininess(float *shininess)
Get the shininess.
HRESULT tfSystem_setDiffuseColor(float *color)
Set the diffuse color.
HRESULT tfSystem_cameraViewTop()
Move the camera to view the domain from the top.
HRESULT tfSystem_cameraRotateRight()
Rotate the camera right.
HRESULT tfSystem_getGridColor(float **color)
Get the grid color.
HRESULT tfSystem_cameraRotateToEulerAngle(float *angles)
Rotate the camera to a set of Euler angles.
HRESULT tfSystem_getSceneBoxColor(float **color)
Get the scene box color.
HRESULT tfSystem_screenshotS(const char *filePath, bool decorate, float *bgcolor)
Save a screenshot of the current scene.
HRESULT tfSystem_setBackgroundColor(float *color)
Set the background color.
HRESULT tfSystem_setShininess(float shininess)
Set the shininess.
HRESULT tfSystem_decorated(bool *decorated)
Test whether the rendered scene is decorated.
HRESULT tfSystem_cameraRotateDown()
Rotate the camera down.
HRESULT tfSystem_cameraZoomTo(float distance)
Zoom the camera to a distance.
HRESULT tfSystem_getSpecularColor(float **color)
Get specular color.
HRESULT tfSystem_cameraZoomIn()
Zoom the camera in.
HRESULT tfSystem_cameraZoomOut()
Zoom the camera out.
HRESULT tfSystem_cameraZoom(float *zoom)
Get the current camera zoom.
HRESULT tfSystem_cameraTranslateUp()
Translate the camera up.
HRESULT tfSystem_cameraRotation(float **rotation)
Get the current camera rotation.
HRESULT tfSystem_cameraTranslateBackward()
Translate the camera backward.
HRESULT tfSystem_cameraRotateLeft()
Rotate the camera left.
HRESULT tfSystem_getRendering3DDihedrals(bool *flag)
HRESULT tfSystem_contextRelease()
Release the current context.
HRESULT tfSystem_showDiscretization(bool show)
Set flag to draw/not draw discretization.
HRESULT tfSystem_getAmbientColor(float **color)
Get the ambient color.
HRESULT tfSystem_setLightColor(float *color)
Set the light color.
HRESULT tfSystem_imageData(char **imgData, size_t *imgSize)
Get the current image data.
HRESULT tfSystem_cameraRollRight()
Rotate the camera right.
HRESULT tfSystem_cameraRollLeft()
Roll the camera left.
HRESULT tfSystem_cameraReset()
Reset the camera.
HRESULT tfSystem_cameraTranslateBy(float x, float y)
Translate the camera by the delta amount of (NDC) mouse position.
HRESULT tfSystem_cameraInitMouse(int x, int y)
Initialize the camera at a mouse position.
HRESULT tfSystem_getDiffuseColor(float **color)
Get the diffuse color.
HRESULT tfSystem_setLineWidth(tfFloatP_t lineWidth)
HRESULT tfSystem_cameraMoveTo(float *eye, float *center, float *up)
Set the camera view parameters.
HRESULT tfSystem_cameraTranslateMouse(int x, int y)
Translate the camera from the previous (screen) mouse position to the current (screen) mouse position...
HRESULT tfSystem_showingDiscretization(bool *showing)
Test whether discretization is currently shown.
HRESULT tfSystem_cameraMoveToR(float *center, float *rotation, float zoom)
Set the camera view parameters.
HRESULT tfSystem_toggleRendering3DAngles()
HRESULT tfSystem_getCompileFlags(char ***flags, unsigned int *numFlags)
Get compiler flags of this installation.
HRESULT tfSystem_viewReshape(int sizex, int sizey)
Update screen size after the window has been resized.
HRESULT tfSystem_decorateScene(bool decorate)
Set flag to draw/not draw scene decorators (e.g., grid)
HRESULT tfSystem_cameraTranslateDown()
Translate the camera down.
HRESULT tfSystem_setSpecularColor(float *color)
Set the specular color.
HRESULT tfSystem_cameraEnableLagging()
Enable camera lagging.
HRESULT tfSystem_cameraTranslateRight()
Translate the camera right.
HRESULT tfSystem_toggleRendering3DBonds()
HRESULT tfSystem_getGLInfo(char ***names, char ***values, unsigned int *numNames)
Get OpenGL info.
HRESULT tfSystem_setRendering3DDihedrals(bool flag)
HRESULT tfSystem_setRendering3DAll(bool flag)
HRESULT tfSystem_cameraViewFront()
Move the camera to view the domain from the front.
HRESULT tfSystem_getEGLInfo(char **info, unsigned int *numChars)
Get EGL info.
HRESULT tfSystem_setRendering3DAngles(bool flag)
HRESULT tfSystem_getCPUInfo(char ***names, bool **flags, unsigned int *numNames)
Get CPU info.
HRESULT tfSystem_getLineWidthMax(tfFloatP_t *lineWidth)
HRESULT tfSystem_getRendering3DAngles(bool *flag)
HRESULT tfSystem_cameraCenter(float **center)
Get the current camera view center position.
HRESULT tfSystem_cameraRotateUp()
Rotate the camera up.
HRESULT tfSystem_getLightDirection(float **lightDir)
Get the light direction.
HRESULT tfSystem_getRendering3DBonds(bool *flag)
HRESULT tfSystem_setDiscretizationColor(float *color)
Set the color of the discretization grid.
HRESULT tfSystem_toggleRendering3DDihedrals()
HRESULT tfSystem_contextMakeCurrent()
Make the context current.
float tfSystem_cameraGetLagging()
Get the camera lagging.
HRESULT tfSystem_cameraTranslateLeft()
Translate the camera left.
HRESULT tfSystem_setGridColor(float *color)
Set the grid color.
bool tfSystem_cameraIsLagging()
Test whether the camera is lagging.
HRESULT tfSystem_setSceneBoxColor(float *color)
Set the scene box color.
HRESULT tfSystem_cameraRotateToAxis(float *axis, float distance)
Rotate the camera to a point from the view center a distance along an axis.
HRESULT tfSystem_cameraTranslateForward()
Translate the camera forward.
HRESULT tfSystem_setAmbientColor(float *color)
Set the ambient color.
HRESULT tfSystem_setRendering3DBonds(bool flag)
HRESULT tfSystem_getLineWidth(tfFloatP_t *lineWidth)
HRESULT tfSystem_getDiscretizationColor(float **color)
Get the current color of the discretization grid.
HRESULT tfSystem_cameraViewRight()
Move the camera to view the domain from the right.
HRESULT tfSystem_cameraSetLagging(float lagging)
Set the camera lagging. Value must be in [0, 1)
HRESULT tfSystem_cameraZoomBy(float delta)
Zoom the camera by an increment in distance.
HRESULT tfSystem_getLineWidthMin(tfFloatP_t *lineWidth)