Tissue Forge C 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfCStyle.h File Reference
#include "tf_port_c.h"
#include "tfCParticle.h"
Include dependency graph for tfCStyle.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tfRenderingStyleHandle
 Handle to a rendering::Style instance. More...
 
struct  tfRenderingColorMapperHandle
 Handle to a rendering::ColorMapper instance. More...
 

Functions

HRESULT tfRenderingColorMapper_init (struct tfRenderingColorMapperHandle *handle, const char *name, float min, float max)
 Initialize an instance.
 
HRESULT tfRenderingColorMapper_destroy (struct tfRenderingColorMapperHandle *handle)
 Destroy an instance.
 
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_getMaxVal (struct tfRenderingColorMapperHandle *handle, float *val)
 Get the maximum map value.
 
HRESULT tfRenderingColorMapper_setMaxVal (struct tfRenderingColorMapperHandle *handle, float val)
 Set the maximum map value.
 
HRESULT tfRenderingColorMapper_hasMapParticle (struct tfRenderingColorMapperHandle *handle, bool *result)
 Test whether the mapper has a particle map.
 
HRESULT tfRenderingColorMapper_hasMapAngle (struct tfRenderingColorMapperHandle *handle, bool *result)
 Test whether the mapper has an angle map.
 
HRESULT tfRenderingColorMapper_hasMapBond (struct tfRenderingColorMapperHandle *handle, bool *result)
 Test whether the mapper has a bond map.
 
HRESULT tfRenderingColorMapper_hasMapDihedral (struct tfRenderingColorMapperHandle *handle, bool *result)
 Test whether the mapper has a dihedral map.
 
HRESULT tfRenderingColorMapper_clearMapParticle (struct tfRenderingColorMapperHandle *handle)
 Clear the particle map.
 
HRESULT tfRenderingColorMapper_clearMapAngle (struct tfRenderingColorMapperHandle *handle)
 Clear the angle map.
 
HRESULT tfRenderingColorMapper_clearMapBond (struct tfRenderingColorMapperHandle *handle)
 Clear the bond map.
 
HRESULT tfRenderingColorMapper_clearMapDihedral (struct tfRenderingColorMapperHandle *handle)
 Clear the dihedral map.
 
HRESULT tfRenderingColorMapper_setMapParticlePositionX (struct tfRenderingColorMapperHandle *handle)
 Set the particle map to x-coordinate of particle position.
 
HRESULT tfRenderingColorMapper_setMapParticlePositionY (struct tfRenderingColorMapperHandle *handle)
 Set the particle map to y-coordinate of particle position.
 
HRESULT tfRenderingColorMapper_setMapParticlePositionZ (struct tfRenderingColorMapperHandle *handle)
 Set the particle map to z-coordinate of particle position.
 
HRESULT tfRenderingColorMapper_setMapParticleVelocityX (struct tfRenderingColorMapperHandle *handle)
 Set the particle map to x-component of particle velocity.
 
HRESULT tfRenderingColorMapper_setMapParticleVelocityY (struct tfRenderingColorMapperHandle *handle)
 Set the particle map to y-component of particle velocity.
 
HRESULT tfRenderingColorMapper_setMapParticleVelocityZ (struct tfRenderingColorMapperHandle *handle)
 Set the particle map to z-component of particle velocity.
 
HRESULT tfRenderingColorMapper_setMapParticleSpeed (struct tfRenderingColorMapperHandle *handle)
 Set the particle map to particle speed.
 
HRESULT tfRenderingColorMapper_setMapParticleForceX (struct tfRenderingColorMapperHandle *handle)
 Set the particle map to x-component of particle force.
 
HRESULT tfRenderingColorMapper_setMapParticleForceY (struct tfRenderingColorMapperHandle *handle)
 Set the particle map to y-component of particle force.
 
HRESULT tfRenderingColorMapper_setMapParticleForceZ (struct tfRenderingColorMapperHandle *handle)
 Set the particle map to z-component of particle force.
 
HRESULT tfRenderingColorMapper_setMapParticleSpecies (struct tfRenderingColorMapperHandle *handle, struct tfParticleTypeHandle *pType, const char *name)
 Set the particle map to a species value.
 
HRESULT tfRenderingColorMapper_setMapAngleAngle (struct tfRenderingColorMapperHandle *handle)
 Set the angle map to angle.
 
HRESULT tfRenderingColorMapper_setMapAngleAngleEq (struct tfRenderingColorMapperHandle *handle)
 Set the angle map to angle from equilibrium.
 
HRESULT tfRenderingColorMapper_setMapBondLength (struct tfRenderingColorMapperHandle *handle)
 Set the bond map to length.
 
HRESULT tfRenderingColorMapper_setMapBondLengthEq (struct tfRenderingColorMapperHandle *handle)
 Set the bond map to length from equilibrium.
 
HRESULT tfRenderingColorMapper_setMapDihedralAngle (struct tfRenderingColorMapperHandle *handle)
 Set the dihedral map to angle.
 
HRESULT tfRenderingColorMapper_setMapDihedralAngleEq (struct tfRenderingColorMapperHandle *handle)
 Set the dihedral map to angle from equilibrium.
 
HRESULT tfRenderingColorMapper_set_colormap (struct tfRenderingColorMapperHandle *handle, const char *s)
 Try to set the colormap.
 
HRESULT tfRenderingStyle_init (struct tfRenderingStyleHandle *handle)
 Initialize an instance.
 
HRESULT tfRenderingStyle_initC (struct tfRenderingStyleHandle *handle, float *color, bool visible)
 Initialize an instance.
 
HRESULT tfRenderingStyle_initS (struct tfRenderingStyleHandle *handle, const char *colorName, bool visible)
 Initialize an instance.
 
HRESULT tfRenderingStyle_destroy (struct tfRenderingStyleHandle *handle)
 Destroy an instance.
 
HRESULT tfRenderingStyle_setColor (struct tfRenderingStyleHandle *handle, const char *colorName)
 Set the color by name.
 
HRESULT tfRenderingStyle_getVisible (struct tfRenderingStyleHandle *handle, bool *visible)
 Test whether the instance is visible.
 
HRESULT tfRenderingStyle_setVisible (struct tfRenderingStyleHandle *handle, bool visible)
 Set whether the instance is visible.
 
HRESULT tfRenderingStyle_getColorMapper (struct tfRenderingStyleHandle *handle, struct tfRenderingColorMapperHandle *mapper)
 Get the color mapper, if any.
 
HRESULT tfRenderingStyle_setColorMapper (struct tfRenderingStyleHandle *handle, struct tfRenderingColorMapperHandle *mapper)
 Set the color mapper.
 
HRESULT tfRenderingStyle_toString (struct tfRenderingStyleHandle *handle, char **str, unsigned int *numChars)
 Get a JSON string representation.
 
HRESULT tfRenderingStyle_fromString (struct tfRenderingStyleHandle *handle, const char *str)
 Create from a JSON string representation.
 

Function Documentation

◆ tfRenderingColorMapper_clearMapAngle()

HRESULT tfRenderingColorMapper_clearMapAngle ( struct tfRenderingColorMapperHandle * handle)

Clear the angle map.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_clearMapBond()

HRESULT tfRenderingColorMapper_clearMapBond ( struct tfRenderingColorMapperHandle * handle)

Clear the bond map.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_clearMapDihedral()

HRESULT tfRenderingColorMapper_clearMapDihedral ( struct tfRenderingColorMapperHandle * handle)

Clear the dihedral map.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_clearMapParticle()

HRESULT tfRenderingColorMapper_clearMapParticle ( struct tfRenderingColorMapperHandle * handle)

Clear the particle map.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_destroy()

HRESULT tfRenderingColorMapper_destroy ( struct tfRenderingColorMapperHandle * handle)

Destroy an instance.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_getMaxVal()

HRESULT tfRenderingColorMapper_getMaxVal ( struct tfRenderingColorMapperHandle * handle,
float * val )

Get the maximum map value.

Parameters
handlepopulated handle
valvalue
Returns
S_OK on success

◆ tfRenderingColorMapper_getMinVal()

HRESULT tfRenderingColorMapper_getMinVal ( struct tfRenderingColorMapperHandle * handle,
float * val )

Get the minimum map value.

Parameters
handlepopulated handle
valvalue
Returns
S_OK on success

◆ tfRenderingColorMapper_hasMapAngle()

HRESULT tfRenderingColorMapper_hasMapAngle ( struct tfRenderingColorMapperHandle * handle,
bool * result )

Test whether the mapper has an angle map.

Parameters
handlepopulated handle
resultresult of test
Returns
S_OK on success

◆ tfRenderingColorMapper_hasMapBond()

HRESULT tfRenderingColorMapper_hasMapBond ( struct tfRenderingColorMapperHandle * handle,
bool * result )

Test whether the mapper has a bond map.

Parameters
handlepopulated handle
resultresult of test
Returns
S_OK on success

◆ tfRenderingColorMapper_hasMapDihedral()

HRESULT tfRenderingColorMapper_hasMapDihedral ( struct tfRenderingColorMapperHandle * handle,
bool * result )

Test whether the mapper has a dihedral map.

Parameters
handlepopulated handle
resultresult of test
Returns
S_OK on success

◆ tfRenderingColorMapper_hasMapParticle()

HRESULT tfRenderingColorMapper_hasMapParticle ( struct tfRenderingColorMapperHandle * handle,
bool * result )

Test whether the mapper has a particle map.

Parameters
handlepopulated handle
resultresult of test
Returns
S_OK on success

◆ tfRenderingColorMapper_init()

HRESULT tfRenderingColorMapper_init ( struct tfRenderingColorMapperHandle * handle,
const char * name,
float min,
float max )

Initialize an instance.

Parameters
handlehandle to populate
namecolor map name
minminimum map value
maxmaximum map value
Returns
S_OK on success

◆ tfRenderingColorMapper_set_colormap()

HRESULT tfRenderingColorMapper_set_colormap ( struct tfRenderingColorMapperHandle * handle,
const char * s )

Try to set the colormap.

If the map doesn't exist, does not do anything and returns false.

Parameters
handlepopulated handle
sname of color map
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapAngleAngle()

HRESULT tfRenderingColorMapper_setMapAngleAngle ( struct tfRenderingColorMapperHandle * handle)

Set the angle map to angle.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapAngleAngleEq()

HRESULT tfRenderingColorMapper_setMapAngleAngleEq ( struct tfRenderingColorMapperHandle * handle)

Set the angle map to angle from equilibrium.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapBondLength()

HRESULT tfRenderingColorMapper_setMapBondLength ( struct tfRenderingColorMapperHandle * handle)

Set the bond map to length.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapBondLengthEq()

HRESULT tfRenderingColorMapper_setMapBondLengthEq ( struct tfRenderingColorMapperHandle * handle)

Set the bond map to length from equilibrium.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapDihedralAngle()

HRESULT tfRenderingColorMapper_setMapDihedralAngle ( struct tfRenderingColorMapperHandle * handle)

Set the dihedral map to angle.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapDihedralAngleEq()

HRESULT tfRenderingColorMapper_setMapDihedralAngleEq ( struct tfRenderingColorMapperHandle * handle)

Set the dihedral map to angle from equilibrium.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapParticleForceX()

HRESULT tfRenderingColorMapper_setMapParticleForceX ( struct tfRenderingColorMapperHandle * handle)

Set the particle map to x-component of particle force.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapParticleForceY()

HRESULT tfRenderingColorMapper_setMapParticleForceY ( struct tfRenderingColorMapperHandle * handle)

Set the particle map to y-component of particle force.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapParticleForceZ()

HRESULT tfRenderingColorMapper_setMapParticleForceZ ( struct tfRenderingColorMapperHandle * handle)

Set the particle map to z-component of particle force.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapParticlePositionX()

HRESULT tfRenderingColorMapper_setMapParticlePositionX ( struct tfRenderingColorMapperHandle * handle)

Set the particle map to x-coordinate of particle position.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapParticlePositionY()

HRESULT tfRenderingColorMapper_setMapParticlePositionY ( struct tfRenderingColorMapperHandle * handle)

Set the particle map to y-coordinate of particle position.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapParticlePositionZ()

HRESULT tfRenderingColorMapper_setMapParticlePositionZ ( struct tfRenderingColorMapperHandle * handle)

Set the particle map to z-coordinate of particle position.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapParticleSpecies()

HRESULT tfRenderingColorMapper_setMapParticleSpecies ( struct tfRenderingColorMapperHandle * handle,
struct tfParticleTypeHandle * pType,
const char * name )

Set the particle map to a species value.

Parameters
handlepopulated handle
pTypeparticle type
namespecies name
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapParticleSpeed()

HRESULT tfRenderingColorMapper_setMapParticleSpeed ( struct tfRenderingColorMapperHandle * handle)

Set the particle map to particle speed.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapParticleVelocityX()

HRESULT tfRenderingColorMapper_setMapParticleVelocityX ( struct tfRenderingColorMapperHandle * handle)

Set the particle map to x-component of particle velocity.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapParticleVelocityY()

HRESULT tfRenderingColorMapper_setMapParticleVelocityY ( struct tfRenderingColorMapperHandle * handle)

Set the particle map to y-component of particle velocity.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMapParticleVelocityZ()

HRESULT tfRenderingColorMapper_setMapParticleVelocityZ ( struct tfRenderingColorMapperHandle * handle)

Set the particle map to z-component of particle velocity.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingColorMapper_setMaxVal()

HRESULT tfRenderingColorMapper_setMaxVal ( struct tfRenderingColorMapperHandle * handle,
float val )

Set the maximum map value.

Parameters
handlepopulated handle
valvalue
Returns
S_OK on success

◆ tfRenderingColorMapper_setMinVal()

HRESULT tfRenderingColorMapper_setMinVal ( struct tfRenderingColorMapperHandle * handle,
float val )

Set the minimum map value.

Parameters
handlepopulated handle
valvalue
Returns
S_OK on success

◆ tfRenderingStyle_destroy()

HRESULT tfRenderingStyle_destroy ( struct tfRenderingStyleHandle * handle)

Destroy an instance.

Parameters
handlepopulated handle
Returns
S_OK on success

◆ tfRenderingStyle_fromString()

HRESULT tfRenderingStyle_fromString ( struct tfRenderingStyleHandle * handle,
const char * str )

Create from a JSON string representation.

Returns
S_OK on success

◆ tfRenderingStyle_getColorMapper()

HRESULT tfRenderingStyle_getColorMapper ( struct tfRenderingStyleHandle * handle,
struct tfRenderingColorMapperHandle * mapper )

Get the color mapper, if any.

Parameters
handlepopulated handle
mappercolor mapper
Returns
S_OK on success

◆ tfRenderingStyle_getVisible()

HRESULT tfRenderingStyle_getVisible ( struct tfRenderingStyleHandle * handle,
bool * visible )

Test whether the instance is visible.

Parameters
handlepopulated handle
visiblevisible flag
Returns
S_OK on success

◆ tfRenderingStyle_init()

HRESULT tfRenderingStyle_init ( struct tfRenderingStyleHandle * handle)

Initialize an instance.

Parameters
handlehandle to populate
Returns
S_OK on success

◆ tfRenderingStyle_initC()

HRESULT tfRenderingStyle_initC ( struct tfRenderingStyleHandle * handle,
float * color,
bool visible )

Initialize an instance.

Parameters
handlehandle to populate
color3-element RGB color array
visiblevisible flag
Returns
S_OK on success

◆ tfRenderingStyle_initS()

HRESULT tfRenderingStyle_initS ( struct tfRenderingStyleHandle * handle,
const char * colorName,
bool visible )

Initialize an instance.

Parameters
handlehandle to populate
colorNamename of a color
visiblevisible flag
Returns
S_OK on success

◆ tfRenderingStyle_setColor()

HRESULT tfRenderingStyle_setColor ( struct tfRenderingStyleHandle * handle,
const char * colorName )

Set the color by name.

Parameters
handlepopulated handle
colorNamename of color
Returns
S_OK on success

◆ tfRenderingStyle_setColorMapper()

HRESULT tfRenderingStyle_setColorMapper ( struct tfRenderingStyleHandle * handle,
struct tfRenderingColorMapperHandle * mapper )

Set the color mapper.

Parameters
handlepopulated handle
mappercolor mapper
Returns
S_OK on success

◆ tfRenderingStyle_setVisible()

HRESULT tfRenderingStyle_setVisible ( struct tfRenderingStyleHandle * handle,
bool visible )

Set whether the instance is visible.

Parameters
handlepopulated handle
visiblevisible flag
Returns
S_OK on success

◆ tfRenderingStyle_toString()

HRESULT tfRenderingStyle_toString ( struct tfRenderingStyleHandle * handle,
char ** str,
unsigned int * numChars )

Get a JSON string representation.

Parameters
handlepopulated handle
strstring representation; can be used as an argument in a type particle factory
numCharsnumber of characters of string representation
Returns
S_OK on success