|
Tissue Forge C 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
|
#include "tf_port_c.h"

Go to the source code of this file.
Data Structures | |
| struct | tfPointsTypeHandle |
Functions | |
| HRESULT | tfPointsType_init (struct tfPointsTypeHandle *handle) |
| Initialize an instance. | |
| HRESULT | tfGetSeed (unsigned int *seed) |
| Get the current seed for the pseudo-random number generator. | |
| HRESULT | tfSetSeed (unsigned int seed) |
| Set the current seed for the pseudo-random number generator. | |
| HRESULT | tfColor3Names (char ***names, unsigned int *numNames) |
| Get the names of all available colors. | |
| HRESULT | tfPlaneEquationFPN (tfFloatP_t *point, tfFloatP_t *normal, tfFloatP_t **planeEq) |
| Calculate the coefficients of a plane equation from a point and normal of the plane. | |
| HRESULT | tfPlaneEquationTPN (tfFloatP_t *planeEq, tfFloatP_t **point, tfFloatP_t **normal) |
| Calculate a point and normal of a plane equation. | |
| HRESULT | tfRandomPoint (unsigned int kind, tfFloatP_t dr, tfFloatP_t phi0, tfFloatP_t phi1, tfFloatP_t *x, tfFloatP_t *y, tfFloatP_t *z) |
| Get the coordinates of a random point in a kind of shape. | |
| HRESULT | tfRandomPoints (unsigned int kind, int n, tfFloatP_t dr, tfFloatP_t phi0, tfFloatP_t phi1, tfFloatP_t **x) |
| Get the coordinates of random points in a kind of shape. | |
| HRESULT | tfPoints (unsigned int kind, int n, tfFloatP_t **x) |
| Get the coordinates of uniform points in a kind of shape. | |
| HRESULT | tfFilledCubeUniform (tfFloatP_t *corner1, tfFloatP_t *corner2, unsigned int nParticlesX, unsigned int nParticlesY, unsigned int nParticlesZ, tfFloatP_t **x) |
| Get the coordinates of a uniformly filled cube. | |
| HRESULT | tfFilledCubeRandom (tfFloatP_t *corner1, tfFloatP_t *corner2, int nParticles, tfFloatP_t **x) |
| Get the coordinates of a randomly filled cube. | |
| HRESULT | tfIcosphere (unsigned int subdivisions, tfFloatP_t phi0, tfFloatP_t phi1, tfFloatP_t **verts, unsigned int *numVerts, int **inds, unsigned int *numInds) |
| Get the coordinates of an icosphere. | |
| HRESULT | tfRandomVector (tfFloatP_t mean, tfFloatP_t std, tfFloatP_t *x, tfFloatP_t *y, tfFloatP_t *z) |
| Generates a randomly oriented vector with random magnitude with given mean and standard deviation according to a normal distribution. | |
| HRESULT | tfRandomUnitVector (tfFloatP_t *x, tfFloatP_t *y, tfFloatP_t *z) |
| Generates a randomly oriented unit vector. | |
| HRESULT | tfUtilGetFeaturesMap (char ***names, bool **flags, unsigned int *numFeatures) |
| Get the compiler features names and flags. | |
| HRESULT | tfUtilWallTime (double *wtime) |
| Get the current wall time. | |
| HRESULT | tfUtilCPUTime (double *cputime) |
| Get the current CPU time. | |
| HRESULT tfColor3Names | ( | char *** | names, |
| unsigned int * | numNames ) |
Get the names of all available colors.
| HRESULT tfFilledCubeRandom | ( | tfFloatP_t * | corner1, |
| tfFloatP_t * | corner2, | ||
| int | nParticles, | ||
| tfFloatP_t ** | x ) |
Get the coordinates of a randomly filled cube.
| corner1 | first corner of cube |
| corner2 | second corner of cube |
| nParticles | number of points in the cube |
| x | coordinates of points |
| HRESULT tfFilledCubeUniform | ( | tfFloatP_t * | corner1, |
| tfFloatP_t * | corner2, | ||
| unsigned int | nParticlesX, | ||
| unsigned int | nParticlesY, | ||
| unsigned int | nParticlesZ, | ||
| tfFloatP_t ** | x ) |
Get the coordinates of a uniformly filled cube.
| corner1 | first corner of cube |
| corner2 | second corner of cube |
| nParticlesX | number of particles along x-direction of filling axes (>=2) |
| nParticlesY | number of particles along y-direction of filling axes (>=2) |
| nParticlesZ | number of particles along z-direction of filling axes (>=2) |
| x | coordinates of points |
| HRESULT tfIcosphere | ( | unsigned int | subdivisions, |
| tfFloatP_t | phi0, | ||
| tfFloatP_t | phi1, | ||
| tfFloatP_t ** | verts, | ||
| unsigned int * | numVerts, | ||
| int ** | inds, | ||
| unsigned int * | numInds ) |
Get the coordinates of an icosphere.
| subdivisions | number of subdivisions |
| phi0 | angle lower bound |
| phi1 | angle upper bound |
| verts | returned vertices |
| numVerts | number of vertices |
| inds | returned indices |
| numInds | number of indices |
| HRESULT tfPlaneEquationFPN | ( | tfFloatP_t * | point, |
| tfFloatP_t * | normal, | ||
| tfFloatP_t ** | planeEq ) |
Calculate the coefficients of a plane equation from a point and normal of the plane.
| point | point on the plane |
| normal | normal of the plane |
| planeEq | plane equation coefficients |
| HRESULT tfPlaneEquationTPN | ( | tfFloatP_t * | planeEq, |
| tfFloatP_t ** | point, | ||
| tfFloatP_t ** | normal ) |
Calculate a point and normal of a plane equation.
| planeEq | coefficients of the plane equation |
| point | point on the plane |
| normal | normal of the plane |
| HRESULT tfPoints | ( | unsigned int | kind, |
| int | n, | ||
| tfFloatP_t ** | x ) |
Get the coordinates of uniform points in a kind of shape.
Currently supports ring and sphere.
| kind | kind of shape |
| n | number of points |
| x | coordinates of points |
| HRESULT tfPointsType_init | ( | struct tfPointsTypeHandle * | handle | ) |
Initialize an instance.
| handle | handle to populate |
| HRESULT tfRandomPoint | ( | unsigned int | kind, |
| tfFloatP_t | dr, | ||
| tfFloatP_t | phi0, | ||
| tfFloatP_t | phi1, | ||
| tfFloatP_t * | x, | ||
| tfFloatP_t * | y, | ||
| tfFloatP_t * | z ) |
Get the coordinates of a random point in a kind of shape.
Currently supports sphere, disk, solid cube and solid sphere.
| kind | kind of shape |
| dr | thickness parameter; only applicable to solid sphere kind |
| phi0 | angle lower bound; only applicable to solid sphere kind |
| phi1 | angle upper bound; only applicable to solid sphere kind |
| x | x-coordinate of random point |
| y | y-coordinate of random point |
| z | z-coordinate of random point |
| HRESULT tfRandomPoints | ( | unsigned int | kind, |
| int | n, | ||
| tfFloatP_t | dr, | ||
| tfFloatP_t | phi0, | ||
| tfFloatP_t | phi1, | ||
| tfFloatP_t ** | x ) |
Get the coordinates of random points in a kind of shape.
Currently supports sphere, disk, solid cube and solid sphere.
| kind | kind of shape |
| n | number of points |
| dr | thickness parameter; only applicable to solid sphere kind |
| phi0 | angle lower bound; only applicable to solid sphere kind |
| phi1 | angle upper bound; only applicable to solid sphere kind |
| x | coordinates of random points |
| HRESULT tfRandomUnitVector | ( | tfFloatP_t * | x, |
| tfFloatP_t * | y, | ||
| tfFloatP_t * | z ) |
Generates a randomly oriented unit vector.
| x | x-component of vector |
| y | y-component of vector |
| z | z-component of vector |
| HRESULT tfRandomVector | ( | tfFloatP_t | mean, |
| tfFloatP_t | std, | ||
| tfFloatP_t * | x, | ||
| tfFloatP_t * | y, | ||
| tfFloatP_t * | z ) |
Generates a randomly oriented vector with random magnitude with given mean and standard deviation according to a normal distribution.
| mean | magnitude mean |
| std | magnitude standard deviation |
| x | x-component of vector |
| y | y-component of vector |
| z | z-component of vector |
| HRESULT tfSetSeed | ( | unsigned int | seed | ) |
Set the current seed for the pseudo-random number generator.
| seed | new seed value |
| HRESULT tfUtilCPUTime | ( | double * | cputime | ) |
Get the current CPU time.
| cputime | CPU time |
| HRESULT tfUtilGetFeaturesMap | ( | char *** | names, |
| bool ** | flags, | ||
| unsigned int * | numFeatures ) |
Get the compiler features names and flags.
| names | feature names |
| flags | feature flags |
| numFeatures | number of features |
| HRESULT tfUtilWallTime | ( | double * | wtime | ) |
Get the current wall time.
| wtime | wall time |