Tissue Forge C 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfCStyle.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
24
25#ifndef _WRAPS_C_TFCSTYLE_H_
26#define _WRAPS_C_TFCSTYLE_H_
27
28#include "tf_port_c.h"
29
30#include "tfCParticle.h"
31
32// Handles
33
38struct CAPI_EXPORT tfRenderingStyleHandle {
39 void *tfObj;
40};
41
46struct CAPI_EXPORT tfRenderingColorMapperHandle {
47 void *tfObj;
48};
49
50
52// rendering::ColorMapper //
54
55
65CAPI_FUNC(HRESULT) tfRenderingColorMapper_init(struct tfRenderingColorMapperHandle* handle, const char* name, float min, float max);
66
74
82CAPI_FUNC(HRESULT) tfRenderingColorMapper_getMinVal(struct tfRenderingColorMapperHandle* handle, float* val);
83
91CAPI_FUNC(HRESULT) tfRenderingColorMapper_setMinVal(struct tfRenderingColorMapperHandle* handle, float val);
92
100CAPI_FUNC(HRESULT) tfRenderingColorMapper_getMaxVal(struct tfRenderingColorMapperHandle* handle, float* val);
101
109CAPI_FUNC(HRESULT) tfRenderingColorMapper_setMaxVal(struct tfRenderingColorMapperHandle* handle, float val);
110
118CAPI_FUNC(HRESULT) tfRenderingColorMapper_hasMapParticle(struct tfRenderingColorMapperHandle* handle, bool* result);
119
127CAPI_FUNC(HRESULT) tfRenderingColorMapper_hasMapAngle(struct tfRenderingColorMapperHandle* handle, bool* result);
128
136CAPI_FUNC(HRESULT) tfRenderingColorMapper_hasMapBond(struct tfRenderingColorMapperHandle* handle, bool* result);
137
145CAPI_FUNC(HRESULT) tfRenderingColorMapper_hasMapDihedral(struct tfRenderingColorMapperHandle* handle, bool* result);
146
154
162
170
178
186
194
202
210
218
226
234
242
250
258
267CAPI_FUNC(HRESULT) tfRenderingColorMapper_setMapParticleSpecies(struct tfRenderingColorMapperHandle* handle, struct tfParticleTypeHandle* pType, const char* name);
268
276
284
292
300
308
316
326CAPI_FUNC(HRESULT) tfRenderingColorMapper_set_colormap(struct tfRenderingColorMapperHandle* handle, const char* s);
327
328
330// rendering::Style //
332
333
340CAPI_FUNC(HRESULT) tfRenderingStyle_init(struct tfRenderingStyleHandle *handle);
341
350CAPI_FUNC(HRESULT) tfRenderingStyle_initC(struct tfRenderingStyleHandle *handle, float *color, bool visible);
351
360CAPI_FUNC(HRESULT) tfRenderingStyle_initS(struct tfRenderingStyleHandle *handle, const char *colorName, bool visible);
361
368CAPI_FUNC(HRESULT) tfRenderingStyle_destroy(struct tfRenderingStyleHandle *handle);
369
377CAPI_FUNC(HRESULT) tfRenderingStyle_setColor(struct tfRenderingStyleHandle *handle, const char *colorName);
378
386CAPI_FUNC(HRESULT) tfRenderingStyle_getVisible(struct tfRenderingStyleHandle *handle, bool *visible);
387
395CAPI_FUNC(HRESULT) tfRenderingStyle_setVisible(struct tfRenderingStyleHandle *handle, bool visible);
396
405
414
423CAPI_FUNC(HRESULT) tfRenderingStyle_toString(struct tfRenderingStyleHandle *handle, char **str, unsigned int *numChars);
424
430CAPI_FUNC(HRESULT) tfRenderingStyle_fromString(struct tfRenderingStyleHandle *handle, const char *str);
431
432#endif // _WRAPS_C_TFCSTYLE_H_
Handle to a ParticleType instance.
Definition tfCParticle.h:119
Handle to a rendering::ColorMapper instance.
Definition tfCStyle.h:46
Handle to a rendering::Style instance.
Definition tfCStyle.h:38
HRESULT tfRenderingColorMapper_hasMapDihedral(struct tfRenderingColorMapperHandle *handle, bool *result)
Test whether the mapper has a dihedral map.
HRESULT tfRenderingColorMapper_set_colormap(struct tfRenderingColorMapperHandle *handle, const char *s)
Try to set the colormap.
HRESULT tfRenderingStyle_toString(struct tfRenderingStyleHandle *handle, char **str, unsigned int *numChars)
Get a JSON string representation.
HRESULT tfRenderingColorMapper_init(struct tfRenderingColorMapperHandle *handle, const char *name, float min, float max)
Initialize an instance.
HRESULT tfRenderingColorMapper_setMapAngleAngle(struct tfRenderingColorMapperHandle *handle)
Set the angle map to angle.
HRESULT tfRenderingStyle_getVisible(struct tfRenderingStyleHandle *handle, bool *visible)
Test whether the instance is visible.
HRESULT tfRenderingStyle_fromString(struct tfRenderingStyleHandle *handle, const char *str)
Create from a JSON string representation.
HRESULT tfRenderingColorMapper_setMapParticlePositionZ(struct tfRenderingColorMapperHandle *handle)
Set the particle map to z-coordinate of particle position.
HRESULT tfRenderingColorMapper_setMapAngleAngleEq(struct tfRenderingColorMapperHandle *handle)
Set the angle map to angle from equilibrium.
HRESULT tfRenderingColorMapper_setMapDihedralAngle(struct tfRenderingColorMapperHandle *handle)
Set the dihedral map to angle.
HRESULT tfRenderingColorMapper_setMapParticlePositionY(struct tfRenderingColorMapperHandle *handle)
Set the particle map to y-coordinate of particle position.
HRESULT tfRenderingColorMapper_setMapParticleForceZ(struct tfRenderingColorMapperHandle *handle)
Set the particle map to z-component of particle force.
HRESULT tfRenderingStyle_initC(struct tfRenderingStyleHandle *handle, float *color, bool visible)
Initialize an instance.
HRESULT tfRenderingColorMapper_setMapParticleForceY(struct tfRenderingColorMapperHandle *handle)
Set the particle map to y-component of particle force.
HRESULT tfRenderingStyle_setColorMapper(struct tfRenderingStyleHandle *handle, struct tfRenderingColorMapperHandle *mapper)
Set the color mapper.
HRESULT tfRenderingColorMapper_hasMapAngle(struct tfRenderingColorMapperHandle *handle, bool *result)
Test whether the mapper has an angle map.
HRESULT tfRenderingColorMapper_clearMapParticle(struct tfRenderingColorMapperHandle *handle)
Clear the particle map.
HRESULT tfRenderingColorMapper_setMapParticleVelocityX(struct tfRenderingColorMapperHandle *handle)
Set the particle map to x-component of particle velocity.
HRESULT tfRenderingColorMapper_setMapBondLength(struct tfRenderingColorMapperHandle *handle)
Set the bond map to length.
HRESULT tfRenderingColorMapper_getMaxVal(struct tfRenderingColorMapperHandle *handle, float *val)
Get the maximum map value.
HRESULT tfRenderingColorMapper_setMapParticleSpecies(struct tfRenderingColorMapperHandle *handle, struct tfParticleTypeHandle *pType, const char *name)
Set the particle map to a species value.
HRESULT tfRenderingStyle_init(struct tfRenderingStyleHandle *handle)
Initialize an instance.
HRESULT tfRenderingStyle_getColorMapper(struct tfRenderingStyleHandle *handle, struct tfRenderingColorMapperHandle *mapper)
Get the color mapper, if any.
HRESULT tfRenderingStyle_destroy(struct tfRenderingStyleHandle *handle)
Destroy an instance.
HRESULT tfRenderingColorMapper_setMapParticlePositionX(struct tfRenderingColorMapperHandle *handle)
Set the particle map to x-coordinate of particle position.
HRESULT tfRenderingColorMapper_clearMapAngle(struct tfRenderingColorMapperHandle *handle)
Clear the angle map.
HRESULT tfRenderingColorMapper_setMapBondLengthEq(struct tfRenderingColorMapperHandle *handle)
Set the bond map to length from equilibrium.
HRESULT tfRenderingColorMapper_setMapParticleVelocityY(struct tfRenderingColorMapperHandle *handle)
Set the particle map to y-component of particle velocity.
HRESULT tfRenderingStyle_setColor(struct tfRenderingStyleHandle *handle, const char *colorName)
Set the color by name.
HRESULT tfRenderingColorMapper_setMapParticleVelocityZ(struct tfRenderingColorMapperHandle *handle)
Set the particle map to z-component of particle velocity.
HRESULT tfRenderingColorMapper_destroy(struct tfRenderingColorMapperHandle *handle)
Destroy an instance.
HRESULT tfRenderingColorMapper_setMapDihedralAngleEq(struct tfRenderingColorMapperHandle *handle)
Set the dihedral map to angle from equilibrium.
HRESULT tfRenderingColorMapper_getMinVal(struct tfRenderingColorMapperHandle *handle, float *val)
Get the minimum map value.
HRESULT tfRenderingColorMapper_setMinVal(struct tfRenderingColorMapperHandle *handle, float val)
Set the minimum map value.
HRESULT tfRenderingColorMapper_setMaxVal(struct tfRenderingColorMapperHandle *handle, float val)
Set the maximum map value.
HRESULT tfRenderingColorMapper_setMapParticleSpeed(struct tfRenderingColorMapperHandle *handle)
Set the particle map to particle speed.
HRESULT tfRenderingColorMapper_hasMapParticle(struct tfRenderingColorMapperHandle *handle, bool *result)
Test whether the mapper has a particle map.
HRESULT tfRenderingColorMapper_hasMapBond(struct tfRenderingColorMapperHandle *handle, bool *result)
Test whether the mapper has a bond map.
HRESULT tfRenderingStyle_initS(struct tfRenderingStyleHandle *handle, const char *colorName, bool visible)
Initialize an instance.
HRESULT tfRenderingColorMapper_setMapParticleForceX(struct tfRenderingColorMapperHandle *handle)
Set the particle map to x-component of particle force.
HRESULT tfRenderingColorMapper_clearMapDihedral(struct tfRenderingColorMapperHandle *handle)
Clear the dihedral map.
HRESULT tfRenderingColorMapper_clearMapBond(struct tfRenderingColorMapperHandle *handle)
Clear the bond map.
HRESULT tfRenderingStyle_setVisible(struct tfRenderingStyleHandle *handle, bool visible)
Set whether the instance is visible.