Tachyon (current)  Current Main Branch
Data Structures | Macros | Typedefs | Functions
tachyon.h File Reference

Tachyon public API function prototypes and declarations used to drive the ray tracing engine. More...

#include "util.h"
#include "hash.h"
#include "tachyon_dep.h"

Go to the source code of this file.

Data Structures

struct  apivector
 
struct  apicolor
 
struct  apitexture
 

Macros

#define TACHYON_VERSION_STRING   "0.99.5"
 string version info More...
 
#define TACHYON_MAJOR_VERSION   0
 major version number More...
 
#define TACHYON_MINOR_VERSION   99
 minor version number More...
 
#define TACHYON_PATCH_VERSION   5
 patch version number More...
 
#define RT_FORMAT_TARGA   0
 24-bit Targa file More...
 
#define RT_FORMAT_PPM   1
 24-bit NetPBM PPM file More...
 
#define RT_FORMAT_SGIRGB   2
 24-bit SGI RGB file More...
 
#define RT_FORMAT_JPEG   3
 24-bit JPEG file More...
 
#define RT_FORMAT_WINBMP   4
 24-bit Windows BMP file More...
 
#define RT_FORMAT_PNG   5
 24-bit PNG file More...
 
#define RT_FORMAT_PPM48   6
 48-bit NetPBM PPM file More...
 
#define RT_FORMAT_PSD48   7
 48-bit Photoshop PSD file More...
 
#define RT_CROP_DISABLED   0
 Image cropping disabled. More...
 
#define RT_CROP_ENABLED   1
 Image cropping enabled. More...
 
#define RT_NORMAL_FIXUP_OFF   0
 surface normals and winding order agree More...
 
#define RT_NORMAL_FIXUP_FLIP   1
 flip normals to agree with winding order More...
 
#define RT_NORMAL_FIXUP_GUESS   2
 random normal/winding, use best guess More...
 
#define RT_ACCUMULATE_OFF   0
 accum. More...
 
#define RT_ACCUMULATE_ON   1
 accum. More...
 
#define RT_ACCUMULATE_CLEAR   2
 accum. More...
 
#define RT_BACKGROUND_TEXTURE_SOLID   0
 uniform bg color More...
 
#define RT_BACKGROUND_TEXTURE_SKY_SPHERE   1
 gradient bg, persp More...
 
#define RT_BACKGROUND_TEXTURE_SKY_ORTHO_PLANE   2
 gradient bg, ortho More...
 
#define RT_FOG_NORMAL   0
 radial fog More...
 
#define RT_FOG_OPENGL   1
 planar OpenGL-like fog More...
 
#define RT_FOG_VMD   1
 planar OpenGL-like fog More...
 
#define RT_FOG_NONE   0
 no fog More...
 
#define RT_FOG_LINEAR   1
 linear fog More...
 
#define RT_FOG_EXP   2
 exponential fog More...
 
#define RT_FOG_EXP2   3
 exponential-squared fog More...
 
#define RT_TRANS_ORIG   0
 original transparency mode More...
 
#define RT_TRANS_VMD   1
 mult shaded color by opacity, for VMD More...
 
#define RT_TRANS_RASTER3D   2
 angle-dependent opacity modulation More...
 
#define RT_BOUNDING_DISABLED   0
 Disable spatial subdivision/bounding. More...
 
#define RT_BOUNDING_ENABLED   1
 Enable spatial subdivision/bounding. More...
 
#define RT_PROJECTION_PERSPECTIVE   0
 Perspective projection mode. More...
 
#define RT_PROJECTION_ORTHOGRAPHIC   1
 Orthographic projection mode. More...
 
#define RT_PROJECTION_PERSPECTIVE_DOF   2
 Perspective projection mode. More...
 
#define RT_PROJECTION_ORTHOGRAPHIC_DOF   3
 Orthographic projection mode. More...
 
#define RT_PROJECTION_EQUIRECTANGULAR   4
 360 lat-long equirectangular More...
 
#define RT_PROJECTION_FISHEYE   5
 Fisheye projection mode. More...
 
#define RT_PROJECTION_STEREO_EQUIRECTANGULAR   6
 over/under omnistereo equirectangular More...
 
#define RT_TEXTURE_CONSTANT   0
 solid color More...
 
#define RT_TEXTURE_3D_CHECKER   1
 checkerboard texture More...
 
#define RT_TEXTURE_GRIT   2
 "grit" procedural texture More...
 
#define RT_TEXTURE_MARBLE   3
 "marble" procedural texture More...
 
#define RT_TEXTURE_WOOD   4
 "wood" procedural texture More...
 
#define RT_TEXTURE_GRADIENT   5
 gradient noise procedural texture More...
 
#define RT_TEXTURE_CYLINDRICAL_CHECKER   6
 cylindrical checkerboard More...
 
#define RT_TEXTURE_CYLINDRICAL_IMAGE   7
 cylindrical image map More...
 
#define RT_TEXTURE_SPHERICAL_IMAGE   8
 spherical image map More...
 
#define RT_TEXTURE_PLANAR_IMAGE   9
 planar image map More...
 
#define RT_TEXTURE_VOLUME_IMAGE   10
 volumetric image map More...
 
#define RT_SHADER_AUTO   0
 Automatically determine shader needed. More...
 
#define RT_SHADER_LOWEST   1
 lowest quality shading available More...
 
#define RT_SHADER_LOW   2
 low quality shading More...
 
#define RT_SHADER_MEDIUM   3
 Medium quality shading. More...
 
#define RT_SHADER_HIGH   4
 High quality shading. More...
 
#define RT_SHADER_FULL   5
 Highest quality shading available. More...
 
#define RT_SHADER_NULL_PHONG   0
 Disable Phong contributions. More...
 
#define RT_SHADER_BLINN_FAST   1
 Fast version of Blinn's equation. More...
 
#define RT_SHADER_BLINN   2
 Blinn's specular highlights, as in OpenGL. More...
 
#define RT_SHADER_PHONG   3
 Phong specular highlights. More...
 
#define RT_PHONG_PLASTIC   0
 Dielectric Phong highlight. More...
 
#define RT_PHONG_METAL   1
 Metallic Phong highlight. More...
 
#define RT_AO_MAXDIST_UNLIMITED   3.402823e+38
 unlimited AO distaned macro More...
 

Typedefs

typedef double flt
 generic floating point number, using double More...
 
typedef flt apiflt
 for backward compatibility More...
 
typedef void * SceneHandle
 

Functions

apivector rt_vector (flt x, flt y, flt z)
 Helper function to make vectors. More...
 
apicolor rt_color (flt r, flt g, flt b)
 Helper function to make colors. More...
 
void rt_set_ui_message (void(*func)(int, char *))
 Set function pointer for user interface output callbacks. More...
 
void rt_set_ui_progress (void(*func)(int))
 Set function pointer for user interface progress callbacks. More...
 
int rt_mynode (void)
 distributed memory parallel node rank More...
 
int rt_numnodes (void)
 distributed memory parallel node count More...
 
int rt_initialize_nompi ()
 Initialize Tachyon library, must be first Tachyon API called. More...
 
int rt_initialize (int *, char ***)
 Initialize Tachyon library, must be first Tachyon API called. More...
 
int rt_initialize_mpi_comm_world ()
 Initialize Tachyon library, must be first Tachyon API called. More...
 
int rt_initialize_mpi_comm (void *mpicomm)
 Initialize Tachyon library, must be first Tachyon API called. More...
 
int rt_initialize_mpi_comm_split (void *mpicomm, int color, int key)
 Initialize Tachyon library, must be first Tachyon API called. More...
 
int rt_set_mpi_comm (void *mpicomm)
 Override the previously set MPI communicator for Tachyon to use. More...
 
int rt_set_mpi_comm_split (void *mpicomm, int color, int key)
 Override the previously set MPI communicator for Tachyon to use. More...
 
int rt_set_mpi_comm_world (void)
 Override the previously set MPI communicator with MPI_COMM_WORLD. More...
 
int rt_set_mpi_comm_world_split (int color, int key)
 Override the previously set MPI communicator for Tachyon to use. More...
 
int rt_set_mpi_comm_world_split_all (void)
 Override the previously set MPI communicator for Tachyon to use. More...
 
void rt_finalize (void)
 Shut down Tachyon library for good, at final use before program termination. More...
 
SceneHandle rt_newscene (void)
 Allocate, initialize, and return a handle for a new scene. More...
 
void rt_deletescene (SceneHandle)
 Destroy and deallocate the specified scene. More...
 
void rt_renderscene (SceneHandle)
 Render the current scene. More...
 
void rt_outputfile (SceneHandle, const char *outname)
 Set the filename for the output image for the specified scene. More...
 
void rt_outputformat (SceneHandle, int format)
 Set the format of the output image(s). More...
 
void rt_resolution (SceneHandle, int hres, int vres)
 Set the horizontal and vertical resolution (in pixels) for the specified scene. More...
 
void rt_get_resolution (SceneHandle, int *hres, int *vres)
 Get the horizontal and vertical resolution (in pixels) for the specified scene. More...
 
void rt_aspectratio (SceneHandle voidscene, float aspectratio)
 Set the view frustum aspect ratio (width/height) More...
 
void rt_get_aspectratio (SceneHandle voidscene, float *aspectratio)
 Get the view frustum aspect ratio (width/height) More...
 
void rt_crop_output (SceneHandle, int hres, int vres, int lx, int ly)
 Crop the output image to the specified size, intended only for use in SPECMPI benchmarking. More...
 
void rt_crop_disable (SceneHandle)
 Disable output image cropping. More...
 
void rt_aa_maxsamples (SceneHandle, int maxsamples)
 Sets the maximum number of supersamples to take for any pixel. More...
 
void rt_verbose (SceneHandle, int v)
 Enables or Disables verbose messages from the Tachyon library during rendering. More...
 
void rt_normal_fixup_mode (SceneHandle, int mode)
 Set the surface normal and polygon winding order fixup mode to use when generating triangles with interpolated surface normals. More...
 
void rt_image_clamp (SceneHandle voidscene)
 Enable clamping of pixel values to the range [0 1) (rather than renormalizing) prior to output. More...
 
void rt_image_normalize (SceneHandle voidscene)
 Enable renormalization of pixel values to the range [0 1) (rather than clamping) prior to output. More...
 
void rt_image_gamma (SceneHandle voidscene, float gamma)
 Apply gamma correction to the pixel values after normalization. More...
 
void rt_rawimage_rgb24 (SceneHandle, unsigned char *rawimage)
 Have Tachyon save the output image in the specified memory area, in raw 24-bit, packed, pixel interleaved, unsigned RGB bytes. More...
 
void rt_rawimage_rgb96f (SceneHandle, float *rawimage)
 Request Tachyon to save the output image in the specified memory area, in raw 96-bit, packed, pixel interleaved, 32-bit float RGB bytes. More...
 
void rt_accumulation_mode (SceneHandle, int mode)
 Request Tachyon to use (or disuse) an internal floating point accumulation buffer, combining the newest frame with previously accumulated frames, normalizing the pixel values using an internal subframe counter. More...
 
void rt_set_numthreads (SceneHandle, int)
 Explicitly set the number of worker threads Tachyon will use. More...
 
void rt_background (SceneHandle, apicolor)
 Set the background color of the specified scene. More...
 
void rt_background_gradient (SceneHandle, apivector up, flt topval, flt botval, apicolor topcolor, apicolor botcolor)
 Set parameters for gradient (sky plane or sphere) background texturing. More...
 
void rt_background_mode (SceneHandle, int mode)
 Set the background texturing mode to use. More...
 
void rt_fog_rendering_mode (SceneHandle, int)
 Set fog rendering mode, either radial fog (native Tachyon behavior), or an OpenGL- or VMD-like planar fog. More...
 
void rt_fog_mode (SceneHandle, int)
 Set fog style (linear, exponential, exponential-squared). More...
 
void rt_fog_parms (SceneHandle, apicolor col, flt start, flt end, flt density)
 Set fog rendering parameters. More...
 
void rt_trans_max_surfaces (SceneHandle, int maxsurfaces)
 Set the maximum number of transparent surfaces that will be rendered. More...
 
void rt_trans_mode (SceneHandle, int mode)
 Set transparency rendering mode. More...
 
void rt_shadow_filtering (SceneHandle, int mode)
 Control whether or not transparent surfaces modulate incident light or not. More...
 
void rt_boundmode (SceneHandle, int mode)
 Enables or disable automatic generation and use of ray tracing acceleration data structures. More...
 
void rt_boundthresh (SceneHandle, int threshold)
 Set the threshold to be used when automatic generation of ray tracing acceleration structures is to be used. More...
 
void rt_camera_projection (SceneHandle, int mode)
 Set camera projection mode. More...
 
void rt_camera_position (SceneHandle, apivector center, apivector viewdir, apivector updir)
 Set camera position and orientation. More...
 
void rt_camera_position3fv (SceneHandle, const float *center, const float *viewdir, const float *updir)
 Set camera position and orientation. More...
 
void rt_get_camera_position (SceneHandle, apivector *center, apivector *viewdir, apivector *updir, apivector *rightdir)
 Get camera position and orientation. More...
 
void rt_get_camera_position3fv (SceneHandle, float *center, float *viewdir, float *updir, float *rightdir)
 Get camera position and orientation. More...
 
void rt_camera_raydepth (SceneHandle, int maxdepth)
 Camera maximum ray recursion depth (i.e. More...
 
void rt_camera_zoom (SceneHandle, flt zoom)
 Set camera "zoom" factor. More...
 
flt rt_get_camera_zoom (SceneHandle)
 Return current camera "zoom" factor. More...
 
void rt_camera_eye_separation (SceneHandle, flt eyesep)
 Set camera stereoscopic eye separation. More...
 
flt rt_get_camera_eye_separation (SceneHandle)
 Return current camera eye separation. More...
 
void rt_camera_modulate_eye_separation (SceneHandle, flt cospow)
 Set camera stereoscopic eye separation modulation and cosine power. More...
 
flt rt_get_camera_modulate_eye_separation (SceneHandle)
 Return current camera eye separation. More...
 
void rt_camera_vfov (SceneHandle, flt vfov)
 Set vertical field of view (in degrees) for a perspective camera. More...
 
flt rt_get_camera_vfov (SceneHandle)
 Return vertical field of view (in degrees) for a perspective camera. More...
 
void rt_camera_frustum (SceneHandle, flt left, flt right, flt bottom, flt top)
 Set view frustum for active camera. More...
 
void rt_camera_dof (SceneHandle voidscene, flt focaldist, flt aperture)
 Set depth-of-field rendering options. More...
 
void * rt_texture (SceneHandle, apitexture *)
 Translate a texture definition into the internal format used by Tachyon, and returns an opaque pointer to the internal texturing data structure that is passed to object creation routines. More...
 
void rt_define_teximage_rgb24 (const char *name, int xsize, int ysize, int zsize, unsigned char *rgb24data)
 Define a named 1-D, 2-D, or 3-D texture image with a 24-bit RGB image buffer, without any file references. More...
 
void * rt_texture_copy_standard (SceneHandle, void *oldtex)
 Do not use this unless you know what you're doing, this is a short-term workaround until new object types have been created. More...
 
void * rt_texture_copy_vcstri (SceneHandle, void *oldtex)
 Do not use this unless you know what you're doing, this is a short-term workaround until new object types have been created. More...
 
void rt_shadermode (SceneHandle voidscene, int mode)
 Set the shading mode for the specified scene. More...
 
void rt_phong_shader (SceneHandle voidscene, int mode)
 Set the equation used for rendering specular highlights. More...
 
void rt_tex_phong (void *voidtex, flt phong, flt phongexp, int type)
 Set Phong shading parameters for an existing texture. More...
 
void rt_tex_transmode (void *voidtex, int transmode)
 Set transparent surface shading parameters for an existing texture, enabling or disabling angle-modulated transparency. More...
 
void rt_tex_outline (void *voidtex, flt outline, flt outlinewidth)
 Set edge cueing outline shading parameters for an existing texture. More...
 
void rt_rescale_lights (SceneHandle, flt lightscale)
 Rescale all light sources in the scene by factor lightscale. More...
 
void * rt_light (SceneHandle, void *tex, apivector center, flt radius)
 Define a point light with associated texture, position, and radius. More...
 
void * rt_light3fv (SceneHandle, void *tex, const float *center, float radius)
 Define a point light with associated texture, position, and radius. More...
 
void * rt_directional_light (SceneHandle, void *tex, apivector direction)
 Define a directional light with associated texture and direction. More...
 
void * rt_directional_light3fv (SceneHandle, void *tex, const float *direction)
 Define a directional light with associated texture and direction. More...
 
void * rt_spotlight (SceneHandle, void *tex, apivector center, flt radius, apivector direction, flt fallstart, flt fallend)
 Define a spotlight with associated texture, position, radius, direction, falloff start, and falloff end parameters. More...
 
void * rt_spotlight3fv (SceneHandle, void *tex, const float *center, float radius, const float *direction, float fallstart, float fallend)
 Define a spotlight with associated texture, position, radius, direction, falloff start, and falloff end parameters. More...
 
void rt_light_attenuation (void *light, flt constfactor, flt linearfactor, flt quadfactor)
 Set light attenuation parameters for an existing light. More...
 
void rt_ambient_occlusion (void *scene, int numsamples, flt maxdist, apicolor col)
 Ambient occlusion lighting, with monte carlo sampling of omnidirectional "sky" light. More...
 
void rt_clip_fv (SceneHandle, int numplanes, const float *planes)
 Enable or update a clipping plane group. More...
 
void rt_clip_dv (SceneHandle, int numplanes, const double *planes)
 Enable or update a clipping plane group. More...
 
void rt_clip_off (SceneHandle)
 Disable active clipping plane group. More...
 
void rt_cylinder (SceneHandle, void *tex, apivector center, apivector axis, flt radius)
 Define an infinite cylinder. More...
 
void rt_cylinder3fv (SceneHandle, void *tex, const float *center, const float *axis, float radius)
 Define an infinite cylinder. More...
 
void rt_fcylinder (SceneHandle, void *tex, apivector center, apivector axis, flt radius)
 Define a finite-length cylinder. More...
 
void rt_fcylinder3fv (SceneHandle, void *tex, const float *center, const float *axis, float radius)
 Define a finite-length cylinder. More...
 
void rt_polycylinder (SceneHandle, void *tex, apivector *points, int numpoints, flt radius)
 Define a sequence of connected cylinders. More...
 
void rt_polycylinder3fv (SceneHandle, void *tex, const float *points, int numpoints, float radius)
 Define a sequence of connected cylinders. More...
 
void rt_sphere (SceneHandle, void *tex, apivector center, flt radius)
 Define a sphere with associated texture, center, and radius. More...
 
void rt_sphere3fv (SceneHandle, void *tex, const float *center, float radius)
 Define a sphere with associated texture, center, and radius. More...
 
void rt_plane (SceneHandle, void *tex, apivector center, apivector normal)
 Define a plane. More...
 
void rt_plane3fv (SceneHandle, void *tex, const float *center, const float *normal)
 Define a plane. More...
 
void rt_ring (SceneHandle, void *tex, apivector center, apivector mormal, flt innerrad, flt outerrad)
 Define an annular ring. More...
 
void rt_ring3fv (SceneHandle, void *tex, const float *center, const float *normal, float innerrad, float outerrad)
 Define an annular ring. More...
 
void rt_tri (SceneHandle, void *tex, apivector v0, apivector v1, apivector v2)
 Define a flat-shaded triangle. More...
 
void rt_tri3fv (SceneHandle, void *tex, const float *v0, const float *v1, const float *v2)
 Define a flat-shaded triangle. More...
 
void rt_stri (SceneHandle, void *, apivector v0, apivector v1, apivector v2, apivector n0, apivector n1, apivector n2)
 Define a smooth-shaded triangle using interpolated vertex normals. More...
 
void rt_stri3fv (SceneHandle, void *, const float *v0, const float *v1, const float *v2, const float *n0, const float *n1, const float *n2)
 Define a smooth-shaded triangle using interpolated vertex normals. More...
 
void rt_vcstri (SceneHandle, void *tex, apivector v0, apivector v1, apivector v2, apivector n0, apivector n1, apivector n2, apicolor c0, apicolor c1, apicolor c2)
 Define a smooth-shaded triangle using interpolated vertex normals and per-vertex colors. More...
 
void rt_vcstri3fv (SceneHandle, void *tex, const float *v0, const float *v1, const float *v2, const float *n0, const float *n1, const float *n2, const float *c0, const float *c1, const float *c2)
 Define a smooth-shaded triangle using interpolated vertex normals and per-vertex colors. More...
 
void rt_tristripscnv3fv (SceneHandle scene, void *tex, int numverts, const float *cnv, int numstrips, const int *vertsperstrip, const int *facets)
 Define smooth-shaded triangle strips using interpolated vertex normals, and per-vertex colors. More...
 
void rt_extvol (SceneHandle, void *tex, apivector mincoord, apivector maxcoord, int samples, flt(*evaluator)(flt, flt, flt))
 Define an axis-aligned volumetric data set, with a user-defined sample evaluation callback function. More...
 
void rt_scalarvol (SceneHandle, void *tex, apivector mincoord, apivector maxcoord, int xsize, int ysize, int zsize, const char *filename, void *invol)
 Define an axis-aligned scalar volumetric data set, loaded from a file. More...
 
void rt_heightfield (SceneHandle, void *tex, apivector center, int m, int n, flt *field, flt wx, flt wy)
 Define an axis-aligned height field. More...
 
void rt_landscape (SceneHandle, void *tex, int m, int n, apivector center, flt wx, flt wy)
 Define an auto-generated height field. More...
 
void rt_box (SceneHandle, void *tex, apivector mincoord, apivector maxcoord)
 Define an axis-aligned box. More...
 
void rt_quadsphere (SceneHandle, void *tex, apivector center, flt rad)
 Define a quadric sphere, normally used only for testing and benchmarking. More...
 

Detailed Description

Tachyon public API function prototypes and declarations used to drive the ray tracing engine.

Definition in file tachyon.h.

Macro Definition Documentation

◆ RT_ACCUMULATE_CLEAR

#define RT_ACCUMULATE_CLEAR   2

accum.

buffer enabled, cleared

Definition at line 350 of file tachyon.h.

Referenced by rendercheck(), renderscene(), and tachyon_spaceball_update().

◆ RT_ACCUMULATE_OFF

#define RT_ACCUMULATE_OFF   0

accum.

buffer disabled

Definition at line 348 of file tachyon.h.

Referenced by rt_accumulation_mode(), and rt_newscene().

◆ RT_ACCUMULATE_ON

#define RT_ACCUMULATE_ON   1

accum.

buffer enabled

Definition at line 349 of file tachyon.h.

Referenced by fly_scene(), rendercheck(), and renderscene().

◆ RT_AO_MAXDIST_UNLIMITED

#define RT_AO_MAXDIST_UNLIMITED   3.402823e+38

unlimited AO distaned macro

Definition at line 737 of file tachyon.h.

Referenced by GetShaderMode(), GetSkyLight(), initoptions(), and rt_newscene().

◆ RT_BACKGROUND_TEXTURE_SKY_ORTHO_PLANE

#define RT_BACKGROUND_TEXTURE_SKY_ORTHO_PLANE   2

gradient bg, ortho

Definition at line 388 of file tachyon.h.

Referenced by GetBackGndGradient(), and rt_background_mode().

◆ RT_BACKGROUND_TEXTURE_SKY_SPHERE

#define RT_BACKGROUND_TEXTURE_SKY_SPHERE   1

gradient bg, persp

Definition at line 387 of file tachyon.h.

Referenced by GetBackGndGradient(), and rt_background_mode().

◆ RT_BACKGROUND_TEXTURE_SOLID

#define RT_BACKGROUND_TEXTURE_SOLID   0

uniform bg color

Definition at line 386 of file tachyon.h.

Referenced by rt_background_mode(), and rt_newscene().

◆ RT_BOUNDING_DISABLED

#define RT_BOUNDING_DISABLED   0

Disable spatial subdivision/bounding.

Definition at line 474 of file tachyon.h.

Referenced by getparm().

◆ RT_BOUNDING_ENABLED

#define RT_BOUNDING_ENABLED   1

Enable spatial subdivision/bounding.

Definition at line 475 of file tachyon.h.

Referenced by rendercheck(), and rt_newscene().

◆ RT_CROP_DISABLED

#define RT_CROP_DISABLED   0

Image cropping disabled.

Definition at line 277 of file tachyon.h.

Referenced by renderio(), and rt_crop_disable().

◆ RT_CROP_ENABLED

#define RT_CROP_ENABLED   1

Image cropping enabled.

Definition at line 278 of file tachyon.h.

Referenced by rt_crop_output().

◆ RT_FOG_EXP

#define RT_FOG_EXP   2

exponential fog

Definition at line 442 of file tachyon.h.

Referenced by GetFog(), and rt_fog_mode().

◆ RT_FOG_EXP2

#define RT_FOG_EXP2   3

exponential-squared fog

Definition at line 443 of file tachyon.h.

Referenced by GetFog(), and rt_fog_mode().

◆ RT_FOG_LINEAR

#define RT_FOG_LINEAR   1

linear fog

Definition at line 441 of file tachyon.h.

Referenced by GetFog(), and rt_fog_mode().

◆ RT_FOG_NONE

#define RT_FOG_NONE   0

no fog

Definition at line 440 of file tachyon.h.

Referenced by GetFog(), rt_fog_mode(), and rt_newscene().

◆ RT_FOG_NORMAL

#define RT_FOG_NORMAL   0

radial fog

Definition at line 418 of file tachyon.h.

Referenced by full_shader(), getparm(), medium_shader(), rt_fog_rendering_mode(), and rt_newscene().

◆ RT_FOG_OPENGL

#define RT_FOG_OPENGL   1

planar OpenGL-like fog

Definition at line 419 of file tachyon.h.

Referenced by fog_color(), and rt_fog_rendering_mode().

◆ RT_FOG_VMD

#define RT_FOG_VMD   1

planar OpenGL-like fog

Definition at line 420 of file tachyon.h.

Referenced by getparm(), and GetShaderMode().

◆ RT_FORMAT_JPEG

#define RT_FORMAT_JPEG   3

24-bit JPEG file

Definition at line 243 of file tachyon.h.

Referenced by getparm(), postsceneoptions(), and writeimage().

◆ RT_FORMAT_PNG

#define RT_FORMAT_PNG   5

24-bit PNG file

Definition at line 245 of file tachyon.h.

Referenced by getparm(), postsceneoptions(), and writeimage().

◆ RT_FORMAT_PPM

#define RT_FORMAT_PPM   1

24-bit NetPBM PPM file

Definition at line 241 of file tachyon.h.

Referenced by getparm(), postsceneoptions(), and writeimage().

◆ RT_FORMAT_PPM48

#define RT_FORMAT_PPM48   6

48-bit NetPBM PPM file

Definition at line 250 of file tachyon.h.

Referenced by getparm(), postsceneoptions(), and writeimage().

◆ RT_FORMAT_PSD48

#define RT_FORMAT_PSD48   7

48-bit Photoshop PSD file

Definition at line 251 of file tachyon.h.

Referenced by getparm(), postsceneoptions(), and writeimage().

◆ RT_FORMAT_SGIRGB

#define RT_FORMAT_SGIRGB   2

24-bit SGI RGB file

Definition at line 242 of file tachyon.h.

Referenced by getparm(), postsceneoptions(), and writeimage().

◆ RT_FORMAT_TARGA

#define RT_FORMAT_TARGA   0

24-bit Targa file

Definition at line 240 of file tachyon.h.

Referenced by getparm(), postsceneoptions(), rt_newscene(), and writeimage().

◆ RT_FORMAT_WINBMP

#define RT_FORMAT_WINBMP   4

24-bit Windows BMP file

Definition at line 244 of file tachyon.h.

Referenced by getparm(), postsceneoptions(), and writeimage().

◆ RT_NORMAL_FIXUP_FLIP

#define RT_NORMAL_FIXUP_FLIP   1

flip normals to agree with winding order

Definition at line 303 of file tachyon.h.

Referenced by getparm().

◆ RT_NORMAL_FIXUP_GUESS

#define RT_NORMAL_FIXUP_GUESS   2

random normal/winding, use best guess

Definition at line 304 of file tachyon.h.

Referenced by getparm().

◆ RT_NORMAL_FIXUP_OFF

#define RT_NORMAL_FIXUP_OFF   0

surface normals and winding order agree

Definition at line 302 of file tachyon.h.

Referenced by getparm().

◆ RT_PHONG_METAL

#define RT_PHONG_METAL   1

Metallic Phong highlight.

Definition at line 685 of file tachyon.h.

Referenced by full_shader(), GetTexBody(), and medium_shader().

◆ RT_PHONG_PLASTIC

#define RT_PHONG_PLASTIC   0

Dielectric Phong highlight.

Definition at line 684 of file tachyon.h.

Referenced by GetTexBody().

◆ RT_PROJECTION_EQUIRECTANGULAR

#define RT_PROJECTION_EQUIRECTANGULAR   4

360 lat-long equirectangular

Definition at line 504 of file tachyon.h.

Referenced by GetCamera().

◆ RT_PROJECTION_FISHEYE

#define RT_PROJECTION_FISHEYE   5

Fisheye projection mode.

Definition at line 505 of file tachyon.h.

Referenced by camera_init(), and GetCamera().

◆ RT_PROJECTION_ORTHOGRAPHIC

#define RT_PROJECTION_ORTHOGRAPHIC   1

Orthographic projection mode.

Definition at line 501 of file tachyon.h.

Referenced by camera_init(), and GetCamera().

◆ RT_PROJECTION_ORTHOGRAPHIC_DOF

#define RT_PROJECTION_ORTHOGRAPHIC_DOF   3

Orthographic projection mode.

Definition at line 503 of file tachyon.h.

Referenced by camera_init().

◆ RT_PROJECTION_PERSPECTIVE

#define RT_PROJECTION_PERSPECTIVE   0

Perspective projection mode.

Definition at line 500 of file tachyon.h.

Referenced by camera_init(), and GetCamera().

◆ RT_PROJECTION_PERSPECTIVE_DOF

#define RT_PROJECTION_PERSPECTIVE_DOF   2

Perspective projection mode.

Definition at line 502 of file tachyon.h.

Referenced by camera_init(), and GetCamera().

◆ RT_PROJECTION_STEREO_EQUIRECTANGULAR

#define RT_PROJECTION_STEREO_EQUIRECTANGULAR   6

over/under omnistereo equirectangular

Definition at line 506 of file tachyon.h.

Referenced by camera_init(), and GetCamera().

◆ RT_SHADER_AUTO

#define RT_SHADER_AUTO   0

Automatically determine shader needed.

Definition at line 655 of file tachyon.h.

Referenced by rt_newscene(), and rt_shadermode().

◆ RT_SHADER_BLINN

#define RT_SHADER_BLINN   2

Blinn's specular highlights, as in OpenGL.

Definition at line 675 of file tachyon.h.

Referenced by getparm(), rt_newscene(), and rt_phong_shader().

◆ RT_SHADER_BLINN_FAST

#define RT_SHADER_BLINN_FAST   1

Fast version of Blinn's equation.

Definition at line 674 of file tachyon.h.

Referenced by getparm(), and rt_phong_shader().

◆ RT_SHADER_FULL

#define RT_SHADER_FULL   5

Highest quality shading available.

Definition at line 660 of file tachyon.h.

Referenced by getparm(), GetShaderMode(), and rt_shadermode().

◆ RT_SHADER_HIGH

#define RT_SHADER_HIGH   4

High quality shading.

Definition at line 659 of file tachyon.h.

Referenced by rt_shadermode().

◆ RT_SHADER_LOW

#define RT_SHADER_LOW   2

low quality shading

Definition at line 657 of file tachyon.h.

Referenced by getparm(), GetShaderMode(), and rt_shadermode().

◆ RT_SHADER_LOWEST

#define RT_SHADER_LOWEST   1

lowest quality shading available

Definition at line 656 of file tachyon.h.

Referenced by getparm(), GetShaderMode(), and rt_shadermode().

◆ RT_SHADER_MEDIUM

#define RT_SHADER_MEDIUM   3

Medium quality shading.

Definition at line 658 of file tachyon.h.

Referenced by getparm(), GetShaderMode(), and rt_shadermode().

◆ RT_SHADER_NULL_PHONG

#define RT_SHADER_NULL_PHONG   0

Disable Phong contributions.

Definition at line 673 of file tachyon.h.

Referenced by getparm(), and rt_phong_shader().

◆ RT_SHADER_PHONG

#define RT_SHADER_PHONG   3

Phong specular highlights.

Definition at line 676 of file tachyon.h.

Referenced by getparm(), and rt_phong_shader().

◆ RT_TEXTURE_3D_CHECKER

#define RT_TEXTURE_3D_CHECKER   1

checkerboard texture

Definition at line 603 of file tachyon.h.

Referenced by apitextotex(), and GetTexBody().

◆ RT_TEXTURE_CONSTANT

#define RT_TEXTURE_CONSTANT   0

solid color

Definition at line 602 of file tachyon.h.

Referenced by apitextotex(), and GetTexBody().

◆ RT_TEXTURE_CYLINDRICAL_CHECKER

#define RT_TEXTURE_CYLINDRICAL_CHECKER   6

cylindrical checkerboard

Definition at line 608 of file tachyon.h.

Referenced by apitextotex(), and GetTexBody().

◆ RT_TEXTURE_CYLINDRICAL_IMAGE

#define RT_TEXTURE_CYLINDRICAL_IMAGE   7

cylindrical image map

Definition at line 609 of file tachyon.h.

Referenced by apitextotex(), and GetTexBody().

◆ RT_TEXTURE_GRADIENT

#define RT_TEXTURE_GRADIENT   5

gradient noise procedural texture

Definition at line 607 of file tachyon.h.

Referenced by apitextotex(), and GetTexBody().

◆ RT_TEXTURE_GRIT

#define RT_TEXTURE_GRIT   2

"grit" procedural texture

Definition at line 604 of file tachyon.h.

Referenced by apitextotex(), and GetTexBody().

◆ RT_TEXTURE_MARBLE

#define RT_TEXTURE_MARBLE   3

"marble" procedural texture

Definition at line 605 of file tachyon.h.

Referenced by apitextotex(), and GetTexBody().

◆ RT_TEXTURE_PLANAR_IMAGE

#define RT_TEXTURE_PLANAR_IMAGE   9

planar image map

Definition at line 611 of file tachyon.h.

Referenced by apitextotex(), and GetTexBody().

◆ RT_TEXTURE_SPHERICAL_IMAGE

#define RT_TEXTURE_SPHERICAL_IMAGE   8

spherical image map

Definition at line 610 of file tachyon.h.

Referenced by apitextotex(), and GetTexBody().

◆ RT_TEXTURE_VOLUME_IMAGE

#define RT_TEXTURE_VOLUME_IMAGE   10

volumetric image map

Definition at line 612 of file tachyon.h.

Referenced by apitextotex(), and GetTexBody().

◆ RT_TEXTURE_WOOD

#define RT_TEXTURE_WOOD   4

"wood" procedural texture

Definition at line 606 of file tachyon.h.

Referenced by apitextotex(), and GetTexBody().

◆ RT_TRANS_ORIG

#define RT_TRANS_ORIG   0

original transparency mode

Definition at line 458 of file tachyon.h.

Referenced by apitextotex(), getparm(), GetShaderMode(), GetTexBody(), readmodel(), and rt_newscene().

◆ RT_TRANS_RASTER3D

#define RT_TRANS_RASTER3D   2

angle-dependent opacity modulation

Definition at line 460 of file tachyon.h.

Referenced by full_shader(), getparm(), GetShaderMode(), GetTexBody(), and medium_shader().

◆ RT_TRANS_VMD

#define RT_TRANS_VMD   1

mult shaded color by opacity, for VMD

Definition at line 459 of file tachyon.h.

Referenced by full_shader(), getparm(), GetShaderMode(), and medium_shader().

◆ TACHYON_MAJOR_VERSION

#define TACHYON_MAJOR_VERSION   0

major version number

Definition at line 35 of file tachyon.h.

◆ TACHYON_MINOR_VERSION

#define TACHYON_MINOR_VERSION   99

minor version number

Definition at line 36 of file tachyon.h.

◆ TACHYON_PATCH_VERSION

#define TACHYON_PATCH_VERSION   5

patch version number

Definition at line 37 of file tachyon.h.

◆ TACHYON_VERSION_STRING

#define TACHYON_VERSION_STRING   "0.99.5"

string version info

Definition at line 34 of file tachyon.h.

Referenced by main().

Typedef Documentation

◆ apiflt

typedef flt apiflt

for backward compatibility

Definition at line 49 of file tachyon.h.

◆ flt

typedef double flt

generic floating point number, using double

Definition at line 47 of file tachyon.h.

◆ SceneHandle

typedef void* SceneHandle

Definition at line 51 of file tachyon.h.

Function Documentation

◆ rt_aa_maxsamples()

void rt_aa_maxsamples ( SceneHandle  ,
int  maxsamples 
)

Sets the maximum number of supersamples to take for any pixel.

Definition at line 210 of file api.c.

Referenced by postsceneoptions(), and rt_camera_setup().

◆ rt_accumulation_mode()

void rt_accumulation_mode ( SceneHandle  ,
int  mode 
)

Request Tachyon to use (or disuse) an internal floating point accumulation buffer, combining the newest frame with previously accumulated frames, normalizing the pixel values using an internal subframe counter.

The default Tachyon behavior is to operate without use of the accumulation buffer.

Definition at line 457 of file api.c.

References RT_ACCUMULATE_OFF.

Referenced by fly_scene(), rt_newscene(), and tachyon_spaceball_update().

◆ rt_ambient_occlusion()

void rt_ambient_occlusion ( void *  scene,
int  numsamples,
flt  maxdist,
apicolor  col 
)

Ambient occlusion lighting, with monte carlo sampling of omnidirectional "sky" light.

Definition at line 563 of file api.c.

References apicolor::b, apicolor::g, and apicolor::r.

Referenced by GetShaderMode(), GetSkyLight(), postsceneoptions(), and rt_newscene().

◆ rt_aspectratio()

void rt_aspectratio ( SceneHandle  voidscene,
float  aspectratio 
)

Set the view frustum aspect ratio (width/height)

Definition at line 385 of file api.c.

Referenced by rt_camera_setup().

◆ rt_background()

void rt_background ( SceneHandle  ,
apicolor   
)

Set the background color of the specified scene.

Definition at line 490 of file api.c.

References apicolor::b, apicolor::g, and apicolor::r.

Referenced by GetBackGnd(), NFFGetScenedefs(), ParseAC3D(), ParseNFF(), and rt_newscene().

◆ rt_background_gradient()

void rt_background_gradient ( SceneHandle  ,
apivector  up,
flt  topval,
flt  botval,
apicolor  topcolor,
apicolor  botcolor 
)

Set parameters for gradient (sky plane or sphere) background texturing.

The "up" vector defines the direction of the "top" color. The top and bottom values give maximum and minimum projection values for the dot product between the the incident ray directon or original (sphere or plane respectively) and the "up" vector. The final resulting scaled and clamped value is used as the interpolation factor between the top and bottom gradient colors.

Definition at line 497 of file api.c.

References apicolor::b, apicolor::g, and apicolor::r.

Referenced by GetBackGndGradient(), and rt_background_sky_sphere().

◆ rt_background_mode()

void rt_background_mode ( SceneHandle  ,
int  mode 
)

Set the background texturing mode to use.

When the solid texture mode is used, any ray that does not hit an object and does not achieve 100% fog density will be assigned the solid background color.
When the sky sphere mode is active, the background color is computed by interpolating between a top/bottom color pair. The sky sphere color interpolation is performed by computing a dot product between the incident ray direction and the "up" color gradient direction, and the projected direction component is normalized and clamped against the top and bottom values. The sky sphere background mode is apropriate for any of the perspective or fisheye style camera projections, but not for orthographic projections.

The sky plane background mode is intended for use with orthographic projections. The sky plane mode operates by interpolating similarly to the sky sphere, except that instead of projecting the incident ray direction vector onto the "up" direction vector, the direction component is computed by projecting the incident ray origin onto the "up" vector, since in the orthographic projection, all camera rays have identical direction vectors.

Definition at line 544 of file api.c.

References RT_BACKGROUND_TEXTURE_SKY_ORTHO_PLANE, RT_BACKGROUND_TEXTURE_SKY_SPHERE, RT_BACKGROUND_TEXTURE_SOLID, sky_plane_background_texture(), sky_sphere_background_texture(), and solid_background_texture().

Referenced by GetBackGndGradient(), and rt_newscene().

◆ rt_boundmode()

void rt_boundmode ( SceneHandle  ,
int  mode 
)

Enables or disable automatic generation and use of ray tracing acceleration data structures.

Definition at line 624 of file api.c.

Referenced by postsceneoptions(), and rt_newscene().

◆ rt_boundthresh()

void rt_boundthresh ( SceneHandle  ,
int  threshold 
)

Set the threshold to be used when automatic generation of ray tracing acceleration structures is to be used.

The threshold represents the minimum number of objects which must be present in an area of space before an automatic acceleration system will consider optimizing the objects using spatial subdivision or automatic bounds generation methods.

Definition at line 630 of file api.c.

References MSG_0, rt_mynode(), and rt_ui_message().

Referenced by postsceneoptions(), and rt_newscene().

◆ rt_box()

void rt_box ( SceneHandle  ,
void *  tex,
apivector  mincoord,
apivector  maxcoord 
)

Define an axis-aligned box.

Definition at line 1156 of file api.c.

References add_bounded_object(), and newbox().

Referenced by GetBox().

◆ rt_camera_dof()

void rt_camera_dof ( SceneHandle  voidscene,
flt  focaldist,
flt  aperture 
)

Set depth-of-field rendering options.

Definition at line 361 of file api.c.

References cameradof().

Referenced by GetCamera(), and rt_newscene().

◆ rt_camera_eye_separation()

void rt_camera_eye_separation ( SceneHandle  ,
flt  eyesep 
)

Set camera stereoscopic eye separation.

Definition at line 307 of file api.c.

Referenced by GetCamera(), and rt_camera_setup().

◆ rt_camera_frustum()

void rt_camera_frustum ( SceneHandle  ,
flt  left,
flt  right,
flt  bottom,
flt  top 
)

Set view frustum for active camera.

This routine is best used by experts. The center of the image plane is defined at the camera center, translated one unit length in the view direction. Given this, by defining the left, right, bottom, and top edges of the image plane, one can easily render a very high resolution image in multiple passes (a tile at a time), or one can use the precise view frustum definition to control the field of view more conveniently when matching vs. OpenGL, etc.

Definition at line 345 of file api.c.

References camerafrustum().

Referenced by GetCamera().

◆ rt_camera_modulate_eye_separation()

void rt_camera_modulate_eye_separation ( SceneHandle  ,
flt  cospow 
)

Set camera stereoscopic eye separation modulation and cosine power.

Definition at line 317 of file api.c.

◆ rt_camera_position()

void rt_camera_position ( SceneHandle  ,
apivector  center,
apivector  viewdir,
apivector  updir 
)

Set camera position and orientation.

Definition at line 256 of file api.c.

References cameraposition().

Referenced by animate_scene(), rt_camera_setup(), and tachyon_spaceball_update().

◆ rt_camera_position3fv()

void rt_camera_position3fv ( SceneHandle  ,
const float *  center,
const float *  viewdir,
const float *  updir 
)

Set camera position and orientation.

Definition at line 262 of file api.c.

References cameraposition().

◆ rt_camera_projection()

void rt_camera_projection ( SceneHandle  ,
int  mode 
)

Set camera projection mode.

Definition at line 251 of file api.c.

References cameraprojection().

Referenced by GetCamera().

◆ rt_camera_raydepth()

void rt_camera_raydepth ( SceneHandle  ,
int  maxdepth 
)

Camera maximum ray recursion depth (i.e.

number of levels of reflection and transmission rays traced).

Definition at line 292 of file api.c.

Referenced by postsceneoptions(), and rt_camera_setup().

◆ rt_camera_vfov()

void rt_camera_vfov ( SceneHandle  ,
flt  vfov 
)

Set vertical field of view (in degrees) for a perspective camera.

This API won't have the intended effect on other types of cameras.

Definition at line 333 of file api.c.

References rt_camera_zoom().

◆ rt_camera_zoom()

void rt_camera_zoom ( SceneHandle  ,
flt  zoom 
)

Set camera "zoom" factor.

At a "zoom" factor of 1.0 for a perspective camera, Tachyon defines the height of the image plane as 1.0, at a distance of 1.0 from the camera center, yielding a 90 degree vertical field of view for a normal perspective camera. Zooming to a factor of 2.0 cuts the vertical height of the image plane in half, giving a correspondingly reduced vertical field of view of 53 degrees. For other types of cameras the zoom factor adjusts the projected image plane size accordingly, though the specific field of view .

Definition at line 297 of file api.c.

References camerazoom().

Referenced by rt_camera_setup(), and rt_camera_vfov().

◆ rt_clip_dv()

void rt_clip_dv ( SceneHandle  ,
int  numplanes,
const double *  planes 
)

Enable or update a clipping plane group.

Definition at line 1458 of file api.c.

◆ rt_clip_fv()

void rt_clip_fv ( SceneHandle  ,
int  numplanes,
const float *  planes 
)

Enable or update a clipping plane group.

Definition at line 1433 of file api.c.

Referenced by GetClipGroup().

◆ rt_clip_off()

void rt_clip_off ( SceneHandle  )

Disable active clipping plane group.

Definition at line 1483 of file api.c.

Referenced by GetClipGroupEnd().

◆ rt_color()

apicolor rt_color ( flt  r,
flt  g,
flt  b 
)

Helper function to make colors.

helper to make colors

Definition at line 169 of file api.c.

References apicolor::b, apicolor::g, and apicolor::r.

Referenced by GetBackGndGradient(), GetVertexArray(), main(), and rt_newscene().

◆ rt_crop_disable()

void rt_crop_disable ( SceneHandle  )

Disable output image cropping.

Definition at line 396 of file api.c.

References RT_CROP_DISABLED.

Referenced by rt_newscene().

◆ rt_crop_output()

void rt_crop_output ( SceneHandle  ,
int  hres,
int  vres,
int  lx,
int  ly 
)

Crop the output image to the specified size, intended only for use in SPECMPI benchmarking.

Definition at line 405 of file api.c.

References RT_CROP_ENABLED.

Referenced by postsceneoptions().

◆ rt_cylinder()

void rt_cylinder ( SceneHandle  ,
void *  tex,
apivector  center,
apivector  axis,
flt  radius 
)

Define an infinite cylinder.

Definition at line 1160 of file api.c.

References add_unbounded_object(), and newcylinder().

Referenced by GetCylinder().

◆ rt_cylinder3fv()

void rt_cylinder3fv ( SceneHandle  ,
void *  tex,
const float *  center,
const float *  axis,
float  radius 
)

Define an infinite cylinder.

Definition at line 1164 of file api.c.

References add_bounded_object(), and newcylinder().

◆ rt_define_teximage_rgb24()

void rt_define_teximage_rgb24 ( const char *  name,
int  xsize,
int  ysize,
int  zsize,
unsigned char *  rgb24data 
)

Define a named 1-D, 2-D, or 3-D texture image with a 24-bit RGB image buffer, without any file references.

This allows an application to send Tachyon images for texture mapping without having to touch the filesystem.

Definition at line 951 of file api.c.

References AllocateImageRGB24().

Referenced by GetImageDef().

◆ rt_deletescene()

void rt_deletescene ( SceneHandle  )

Destroy and deallocate the specified scene.

Definition at line 784 of file api.c.

References destroy_render_threads(), free_light_special(), free_objects(), FreeTextures(), and rt_par_delete_scanlinereceives().

Referenced by animate_scene(), fly_scene(), and main().

◆ rt_directional_light()

void* rt_directional_light ( SceneHandle  ,
void *  tex,
apivector  direction 
)

Define a directional light with associated texture and direction.

Definition at line 1077 of file api.c.

References newdirectionallight(), and VNorm().

Referenced by GetDirLight(), and rt_directional_light3fv().

◆ rt_directional_light3fv()

void* rt_directional_light3fv ( SceneHandle  ,
void *  tex,
const float *  direction 
)

Define a directional light with associated texture and direction.

Definition at line 1099 of file api.c.

References rt_directional_light().

◆ rt_extvol()

void rt_extvol ( SceneHandle  ,
void *  tex,
apivector  mincoord,
apivector  maxcoord,
int  samples,
flt(*)(flt, flt, flt evaluator 
)

Define an axis-aligned volumetric data set, with a user-defined sample evaluation callback function.

Definition at line 1152 of file api.c.

References add_bounded_object(), and newextvol().

Referenced by main().

◆ rt_fcylinder()

void rt_fcylinder ( SceneHandle  ,
void *  tex,
apivector  center,
apivector  axis,
flt  radius 
)

Define a finite-length cylinder.

Definition at line 1173 of file api.c.

References add_bounded_object(), and newfcylinder().

Referenced by GetFCylinder(), NFFGetCylCone(), rt_polycylinder(), and rt_tri_cylinder().

◆ rt_fcylinder3fv()

void rt_fcylinder3fv ( SceneHandle  ,
void *  tex,
const float *  center,
const float *  axis,
float  radius 
)

Define a finite-length cylinder.

Definition at line 1177 of file api.c.

References add_bounded_object(), and newfcylinder().

Referenced by rt_polycylinder3fv().

◆ rt_finalize()

void rt_finalize ( void  )

Shut down Tachyon library for good, at final use before program termination.

Tachyon may not be used after rt_finalize has been called.

Definition at line 153 of file api.c.

◆ rt_fog_mode()

void rt_fog_mode ( SceneHandle  ,
int   
)

Set fog style (linear, exponential, exponential-squared).

Definition at line 596 of file api.c.

References fog_color_exp(), fog_color_exp2(), fog_color_linear(), RT_FOG_EXP, RT_FOG_EXP2, RT_FOG_LINEAR, and RT_FOG_NONE.

Referenced by GetFog(), and rt_newscene().

◆ rt_fog_parms()

void rt_fog_parms ( SceneHandle  ,
apicolor  col,
flt  start,
flt  end,
flt  density 
)

Set fog rendering parameters.

Definition at line 573 of file api.c.

Referenced by GetFog(), and rt_newscene().

◆ rt_fog_rendering_mode()

void rt_fog_rendering_mode ( SceneHandle  ,
int   
)

Set fog rendering mode, either radial fog (native Tachyon behavior), or an OpenGL- or VMD-like planar fog.

The Tachyon-native radial fog implementation uses the distance along the ray to the point of intersection as the fog coordinate. This gives more natural results in mirror reflections. The Tachyon-native radial fog implementation also applies fog to the background color, unlike OpenGL. The OpenGL- or VMD-style fog implmentation computes the fog coordinate by determining the its depth in the plane normal to the view direction, at the intersection point. Another difference in behavior is that OpenGL fog does not affect the background color. OpenGL-style fog is only applied to rendered geometry, not to the background color.

Definition at line 581 of file api.c.

References RT_FOG_NORMAL, and RT_FOG_OPENGL.

Referenced by GetShaderMode(), postsceneoptions(), and rt_newscene().

◆ rt_get_aspectratio()

void rt_get_aspectratio ( SceneHandle  voidscene,
float *  aspectratio 
)

Get the view frustum aspect ratio (width/height)

Definition at line 391 of file api.c.

◆ rt_get_camera_eye_separation()

flt rt_get_camera_eye_separation ( SceneHandle  )

Return current camera eye separation.

◆ rt_get_camera_modulate_eye_separation()

flt rt_get_camera_modulate_eye_separation ( SceneHandle  )

Return current camera eye separation.

◆ rt_get_camera_position()

void rt_get_camera_position ( SceneHandle  ,
apivector center,
apivector viewdir,
apivector updir,
apivector rightdir 
)

Get camera position and orientation.

Definition at line 273 of file api.c.

References getcameraposition().

Referenced by tachyon_init_spaceball().

◆ rt_get_camera_position3fv()

void rt_get_camera_position3fv ( SceneHandle  ,
float *  center,
float *  viewdir,
float *  updir,
float *  rightdir 
)

Get camera position and orientation.

Definition at line 280 of file api.c.

References getcameraposition().

◆ rt_get_camera_vfov()

flt rt_get_camera_vfov ( SceneHandle  )

Return vertical field of view (in degrees) for a perspective camera.

This API won't have the intended effect on other types of cameras.

Definition at line 338 of file api.c.

◆ rt_get_camera_zoom()

flt rt_get_camera_zoom ( SceneHandle  )

Return current camera "zoom" factor.

Definition at line 302 of file api.c.

◆ rt_get_resolution()

void rt_get_resolution ( SceneHandle  ,
int *  hres,
int *  vres 
)

Get the horizontal and vertical resolution (in pixels) for the specified scene.

Definition at line 379 of file api.c.

Referenced by postsceneoptions(), and tachyon_display_create().

◆ rt_heightfield()

void rt_heightfield ( SceneHandle  ,
void *  tex,
apivector  center,
int  m,
int  n,
flt field,
flt  wx,
flt  wy 
)

Define an axis-aligned height field.

Definition at line 70 of file apigeom.c.

References rt_tri(), apivector::x, apivector::y, and apivector::z.

◆ rt_image_clamp()

void rt_image_clamp ( SceneHandle  voidscene)

Enable clamping of pixel values to the range [0 1) (rather than renormalizing) prior to output.

This mode is useful for improved rendering performance.

Definition at line 437 of file api.c.

Referenced by postsceneoptions(), and rt_newscene().

◆ rt_image_gamma()

void rt_image_gamma ( SceneHandle  voidscene,
float  gamma 
)

Apply gamma correction to the pixel values after normalization.

Definition at line 449 of file api.c.

Referenced by postsceneoptions(), and rt_newscene().

◆ rt_image_normalize()

void rt_image_normalize ( SceneHandle  voidscene)

Enable renormalization of pixel values to the range [0 1) (rather than clamping) prior to output.

Definition at line 443 of file api.c.

Referenced by postsceneoptions().

◆ rt_initialize()

int rt_initialize ( int *  ,
char ***   
)

Initialize Tachyon library, must be first Tachyon API called.

Takes pointer to argument count, and pointer to argument array

  1. resets and initializes Tachyon (and MPI!)
  2. initializes internal parallel processing facilities, and tests inter-node connectivity.
  3. deallocates previously allocated internal data structures
  4. returns the rank of this computational node on success, -1 on failure.

Definition at line 70 of file api.c.

References global_parhnd, InitTextures(), rt_mynode(), and rt_par_init().

Referenced by main().

◆ rt_initialize_mpi_comm()

int rt_initialize_mpi_comm ( void *  mpicomm)

Initialize Tachyon library, must be first Tachyon API called.

Takes pointer to caller-provided MPI communicator. The caller must have already run MPI_init() before calling this API.

  1. resets and initializes Tachyon
  2. initializes internal parallel processing facilities, and tests inter-node connectivity.
  3. deallocates previously allocated internal data structures
  4. returns the rank of this computational node on success, -1 on failure.

Definition at line 82 of file api.c.

References global_parhnd, InitTextures(), rt_mynode(), and rt_par_init_mpi_comm().

◆ rt_initialize_mpi_comm_split()

int rt_initialize_mpi_comm_split ( void *  mpicomm,
int  color,
int  key 
)

Initialize Tachyon library, must be first Tachyon API called.

Takes pointer to caller-provided MPI communicator. The caller must have already run MPI_init() before calling this API. This variant subdivides compute nodes into multiple rendering groups, according to the same input parameters as MPI_Comm_split().

  1. resets and initializes Tachyon
  2. initializes internal parallel processing facilities, and tests inter-node connectivity.
  3. deallocates previously allocated internal data structures
  4. returns the rank of this computational node on success, -1 on failure.

Definition at line 106 of file api.c.

References global_parhnd, InitTextures(), rt_mynode(), and rt_par_init_mpi_comm_split().

◆ rt_initialize_mpi_comm_world()

int rt_initialize_mpi_comm_world ( )

Initialize Tachyon library, must be first Tachyon API called.

The caller must have already run MPI_init() before calling this API. This API sets Tachyon to use MPI_COMM_WORLD by default.

  1. resets and initializes Tachyon
  2. initializes internal parallel processing facilities, and tests inter-node connectivity.
  3. deallocates previously allocated internal data structures
  4. returns the rank of this computational node on success, -1 on failure.

Definition at line 94 of file api.c.

References global_parhnd, InitTextures(), rt_mynode(), and rt_par_init_mpi_comm_world().

◆ rt_initialize_nompi()

int rt_initialize_nompi ( )

Initialize Tachyon library, must be first Tachyon API called.

This variant shuts-off the MPI features in builds that have MPI, thereby allowing runtime determination of whether to use MPI or not.

Definition at line 58 of file api.c.

References global_parhnd, InitTextures(), rt_mynode(), and rt_par_init_nompi().

◆ rt_landscape()

void rt_landscape ( SceneHandle  ,
void *  tex,
int  m,
int  n,
apivector  center,
flt  wx,
flt  wy 
)

Define an auto-generated height field.

Definition at line 225 of file apigeom.c.

References rt_rand(), RT_RAND_MAX_INV, rt_sheightfield(), and subdivide().

Referenced by GetLandScape().

◆ rt_light()

void* rt_light ( SceneHandle  ,
void *  tex,
apivector  center,
flt  radius 
)

Define a point light with associated texture, position, and radius.

Definition at line 1049 of file api.c.

References add_bounded_object(), and newpointlight().

Referenced by GetLight(), GetScenedefs(), main(), NFFGetLight(), and rt_light3fv().

◆ rt_light3fv()

void* rt_light3fv ( SceneHandle  ,
void *  tex,
const float *  center,
float  radius 
)

Define a point light with associated texture, position, and radius.

Definition at line 1069 of file api.c.

References rt_light().

◆ rt_light_attenuation()

void rt_light_attenuation ( void *  light,
flt  constfactor,
flt  linearfactor,
flt  quadfactor 
)

Set light attenuation parameters for an existing light.

Definition at line 1142 of file api.c.

References light_set_attenuation().

Referenced by GetLight(), and GetSpotLight().

◆ rt_mynode()

int rt_mynode ( void  )

distributed memory parallel node rank

Definition at line 49 of file api.c.

◆ rt_newscene()

SceneHandle rt_newscene ( void  )

◆ rt_normal_fixup_mode()

void rt_normal_fixup_mode ( SceneHandle  ,
int  mode 
)

Set the surface normal and polygon winding order fixup mode to use when generating triangles with interpolated surface normals.

Definition at line 185 of file api.c.

Referenced by presceneoptions(), and rt_newscene().

◆ rt_numnodes()

int rt_numnodes ( void  )

distributed memory parallel node count

Definition at line 53 of file api.c.

References global_parhnd, and rt_par_size().

Referenced by fly_scene().

◆ rt_outputfile()

void rt_outputfile ( SceneHandle  ,
const char *  outname 
)

Set the filename for the output image for the specified scene.

Definition at line 350 of file api.c.

Referenced by animate_scene(), fly_scene(), GetScenedefs(), main(), NFFGetScenedefs(), postsceneoptions(), and rt_newscene().

◆ rt_outputformat()

void rt_outputformat ( SceneHandle  ,
int  format 
)

Set the format of the output image(s).

Definition at line 367 of file api.c.

Referenced by postsceneoptions(), and rt_newscene().

◆ rt_phong_shader()

void rt_phong_shader ( SceneHandle  voidscene,
int  mode 
)

Set the equation used for rendering specular highlights.

Definition at line 678 of file api.c.

References RT_SHADER_BLINN, RT_SHADER_BLINN_FAST, RT_SHADER_NULL_PHONG, RT_SHADER_PHONG, shade_blinn(), shade_blinn_fast(), shade_nullphong(), and shade_phong().

Referenced by postsceneoptions(), and rt_newscene().

◆ rt_plane()

void rt_plane ( SceneHandle  ,
void *  tex,
apivector  center,
apivector  normal 
)

Define a plane.

Definition at line 1186 of file api.c.

References add_unbounded_object(), and newplane().

Referenced by drawsp(), GetPlane(), and main().

◆ rt_plane3fv()

void rt_plane3fv ( SceneHandle  ,
void *  tex,
const float *  center,
const float *  normal 
)

Define a plane.

Definition at line 1190 of file api.c.

References add_unbounded_object(), and newplane().

◆ rt_polycylinder()

void rt_polycylinder ( SceneHandle  ,
void *  tex,
apivector points,
int  numpoints,
flt  radius 
)

Define a sequence of connected cylinders.

Definition at line 20 of file apigeom.c.

References rt_fcylinder(), rt_sphere(), apivector::x, apivector::y, and apivector::z.

Referenced by GetPolyCylinder().

◆ rt_polycylinder3fv()

void rt_polycylinder3fv ( SceneHandle  ,
void *  tex,
const float *  points,
int  numpoints,
float  radius 
)

Define a sequence of connected cylinders.

Definition at line 44 of file apigeom.c.

References rt_fcylinder3fv(), and rt_sphere3fv().

◆ rt_quadsphere()

void rt_quadsphere ( SceneHandle  ,
void *  tex,
apivector  center,
flt  rad 
)

Define a quadric sphere, normally used only for testing and benchmarking.

Definition at line 1410 of file api.c.

References quadmatrix::a, add_unbounded_object(), quadmatrix::b, quadmatrix::c, quadric::ctr, quadmatrix::d, quadmatrix::e, quadmatrix::f, quadmatrix::g, quadmatrix::h, quadmatrix::i, quadmatrix::j, quadric::mat, and newquadric().

◆ rt_rawimage_rgb24()

void rt_rawimage_rgb24 ( SceneHandle  ,
unsigned char *  rawimage 
)

Have Tachyon save the output image in the specified memory area, in raw 24-bit, packed, pixel interleaved, unsigned RGB bytes.

The caller is responsible for making sure that there is enough space in the memory area for the entire image.

Definition at line 419 of file api.c.

Referenced by animate_scene(), fly_scene(), main(), rt_newscene(), tachyon_display_create(), and tachyon_display_draw().

◆ rt_rawimage_rgb96f()

void rt_rawimage_rgb96f ( SceneHandle  ,
float *  rawimage 
)

Request Tachyon to save the output image in the specified memory area, in raw 96-bit, packed, pixel interleaved, 32-bit float RGB bytes.

The caller is responsible for making sure that there is enough space in the memory area for the entire image.

Definition at line 428 of file api.c.

Referenced by rt_newscene().

◆ rt_renderscene()

void rt_renderscene ( SceneHandle  )

Render the current scene.

Definition at line 180 of file api.c.

References renderscene().

Referenced by animate_scene(), fly_scene(), and main().

◆ rt_rescale_lights()

void rt_rescale_lights ( SceneHandle  ,
flt  lightscale 
)

Rescale all light sources in the scene by factor lightscale.

Definition at line 673 of file api.c.

Referenced by GetShaderMode(), postsceneoptions(), and rt_newscene().

◆ rt_resolution()

void rt_resolution ( SceneHandle  ,
int  hres,
int  vres 
)

Set the horizontal and vertical resolution (in pixels) for the specified scene.

Definition at line 372 of file api.c.

Referenced by GetScenedefs(), main(), NFFGetScenedefs(), postsceneoptions(), rt_newscene(), and tachyon_display_draw().

◆ rt_ring()

void rt_ring ( SceneHandle  ,
void *  tex,
apivector  center,
apivector  mormal,
flt  innerrad,
flt  outerrad 
)

Define an annular ring.

Definition at line 1199 of file api.c.

References add_bounded_object(), and newring().

Referenced by GetRing().

◆ rt_ring3fv()

void rt_ring3fv ( SceneHandle  ,
void *  tex,
const float *  center,
const float *  normal,
float  innerrad,
float  outerrad 
)

Define an annular ring.

Definition at line 1203 of file api.c.

References add_bounded_object(), and newring().

◆ rt_scalarvol()

void rt_scalarvol ( SceneHandle  ,
void *  tex,
apivector  mincoord,
apivector  maxcoord,
int  xsize,
int  ysize,
int  zsize,
const char *  filename,
void *  invol 
)

Define an axis-aligned scalar volumetric data set, loaded from a file.

Definition at line 1146 of file api.c.

References add_bounded_object(), and newscalarvol().

Referenced by GetVol(), and main().

◆ rt_set_mpi_comm()

int rt_set_mpi_comm ( void *  mpicomm)

Override the previously set MPI communicator for Tachyon to use.

Tachyon must already be initialized before this API is called. NOTE: This API can currently only be called when no Tachyon scene objects are allocated, as they contain internal references to MPI state associated with the previously active MPI communicator. Returns the new comm rank of this process on success, -1 on failure.

Definition at line 125 of file api.c.

References global_parhnd, rt_par_rank(), and rt_par_set_mpi_comm().

◆ rt_set_mpi_comm_split()

int rt_set_mpi_comm_split ( void *  mpicomm,
int  color,
int  key 
)

Override the previously set MPI communicator for Tachyon to use.

Tachyon must already be initialized before this API is called. This API splits a user-provided communicator into new ones in the same way that MPI_Comm_split() does. NOTE: This API can currently only be called when no Tachyon scene objects are allocated, as they contain internal references to MPI state associated with the previously active MPI communicator. Returns the new comm rank of this process on success, -1 on failure.

Definition at line 132 of file api.c.

References global_parhnd, rt_par_rank(), and rt_par_set_mpi_comm_split().

◆ rt_set_mpi_comm_world()

int rt_set_mpi_comm_world ( void  )

Override the previously set MPI communicator with MPI_COMM_WORLD.

Tachyon must already be initialized before this API is called. NOTE: This API can currently only be called when no Tachyon scene objects are allocated, as they contain internal references to MPI state associated with the previously active MPI communicator. Returns the new comm rank of this process on success, -1 on failure.

Definition at line 118 of file api.c.

References global_parhnd, rt_par_rank(), and rt_par_set_mpi_comm_world().

◆ rt_set_mpi_comm_world_split()

int rt_set_mpi_comm_world_split ( int  color,
int  key 
)

Override the previously set MPI communicator for Tachyon to use.

Tachyon must already be initialized before this API is called. This API splits the MPI_COMM_WORLD communicator into new ones in the same way that MPI_Comm_split() does. NOTE: This API can currently only be called when no Tachyon scene objects are allocated, as they contain internal references to MPI state associated with the previously active MPI communicator. Returns the new comm rank of this process on success, -1 on failure.

Definition at line 139 of file api.c.

References global_parhnd, rt_par_rank(), and rt_par_set_mpi_comm_world_split().

◆ rt_set_mpi_comm_world_split_all()

int rt_set_mpi_comm_world_split_all ( void  )

Override the previously set MPI communicator for Tachyon to use.

Tachyon must already be initialized before this API is called. This API splits the MPI_COMM_WORLD communicator into new ones, with one communicator for each node. NOTE: This API can currently only be called when no Tachyon scene objects are allocated, as they contain internal references to MPI state associated with the previously active MPI communicator. Returns the new comm rank of this process on success, -1 on failure.

Definition at line 146 of file api.c.

References global_parhnd, rt_par_rank(), and rt_par_set_mpi_comm_world_split_all().

◆ rt_set_numthreads()

void rt_set_numthreads ( SceneHandle  ,
int   
)

Explicitly set the number of worker threads Tachyon will use.

Definition at line 471 of file api.c.

References rt_thread_numprocessors(), and rt_thread_setconcurrency().

Referenced by postsceneoptions(), and rt_newscene().

◆ rt_set_ui_message()

void rt_set_ui_message ( void(*)(int, char *)  func)

Set function pointer for user interface output callbacks.

Definition at line 23 of file ui.c.

References global_rt_ui_message.

Referenced by animate_scene(), fly_scene(), and main().

◆ rt_set_ui_progress()

void rt_set_ui_progress ( void(*)(int)  func)

Set function pointer for user interface progress callbacks.

Definition at line 27 of file ui.c.

References global_rt_ui_progress.

Referenced by animate_scene(), fly_scene(), and main().

◆ rt_shadermode()

void rt_shadermode ( SceneHandle  voidscene,
int  mode 
)

Set the shading mode for the specified scene.

Modes are sorted from lowest quality (and fastest execution) to highest quality (and slowest execution)

Definition at line 646 of file api.c.

References full_shader(), low_shader(), lowest_shader(), medium_shader(), RT_SHADER_AUTO, RT_SHADER_FULL, RT_SHADER_HIGH, RT_SHADER_LOW, RT_SHADER_LOWEST, and RT_SHADER_MEDIUM.

Referenced by GetShaderMode(), postsceneoptions(), and rt_newscene().

◆ rt_shadow_filtering()

void rt_shadow_filtering ( SceneHandle  ,
int  mode 
)

Control whether or not transparent surfaces modulate incident light or not.

Definition at line 219 of file api.c.

Referenced by GetShaderMode(), postsceneoptions(), and rt_newscene().

◆ rt_sphere()

void rt_sphere ( SceneHandle  ,
void *  tex,
apivector  center,
flt  radius 
)

Define a sphere with associated texture, center, and radius.

Definition at line 1212 of file api.c.

References add_bounded_object(), and newsphere().

Referenced by drawsp(), GetSphere(), main(), NFFGetSphere(), and rt_polycylinder().

◆ rt_sphere3fv()

void rt_sphere3fv ( SceneHandle  ,
void *  tex,
const float *  center,
float  radius 
)

Define a sphere with associated texture, center, and radius.

Definition at line 1216 of file api.c.

References add_bounded_object(), and newsphere().

Referenced by rt_polycylinder3fv().

◆ rt_spotlight()

void* rt_spotlight ( SceneHandle  ,
void *  tex,
apivector  center,
flt  radius,
apivector  direction,
flt  fallstart,
flt  fallend 
)

Define a spotlight with associated texture, position, radius, direction, falloff start, and falloff end parameters.

Definition at line 1107 of file api.c.

References add_bounded_object(), newspotlight(), and VNorm().

Referenced by GetSpotLight(), and rt_spotlight3fv().

◆ rt_spotlight3fv()

void* rt_spotlight3fv ( SceneHandle  ,
void *  tex,
const float *  center,
float  radius,
const float *  direction,
float  fallstart,
float  fallend 
)

Define a spotlight with associated texture, position, radius, direction, falloff start, and falloff end parameters.

Definition at line 1132 of file api.c.

References rt_spotlight().

◆ rt_stri()

void rt_stri ( SceneHandle  ,
void *  ,
apivector  v0,
apivector  v1,
apivector  v2,
apivector  n0,
apivector  n1,
apivector  n2 
)

Define a smooth-shaded triangle using interpolated vertex normals.

Definition at line 1252 of file api.c.

References add_bounded_object(), newstri(), and stri_normal_fixup().

Referenced by gen_triangles(), GetSTri(), GetVertexArray(), NFFGetPatch(), rt_sheightfield(), rt_tri_fcylinder(), and rt_tri_ring().

◆ rt_stri3fv()

void rt_stri3fv ( SceneHandle  ,
void *  ,
const float *  v0,
const float *  v1,
const float *  v2,
const float *  n0,
const float *  n1,
const float *  n2 
)

Define a smooth-shaded triangle using interpolated vertex normals.

Definition at line 1264 of file api.c.

References add_bounded_object(), newstri(), and stri_normal_fixup().

◆ rt_tex_outline()

void rt_tex_outline ( void *  voidtex,
flt  outline,
flt  outlinewidth 
)

Set edge cueing outline shading parameters for an existing texture.

Definition at line 1008 of file api.c.

Referenced by GetTexBody().

◆ rt_tex_phong()

void rt_tex_phong ( void *  voidtex,
flt  phong,
flt  phongexp,
int  type 
)

Set Phong shading parameters for an existing texture.

Definition at line 994 of file api.c.

Referenced by GetTexBody().

◆ rt_tex_transmode()

void rt_tex_transmode ( void *  voidtex,
int  transmode 
)

Set transparent surface shading parameters for an existing texture, enabling or disabling angle-modulated transparency.

Definition at line 1002 of file api.c.

Referenced by GetTexBody().

◆ rt_texture()

void* rt_texture ( SceneHandle  ,
apitexture  
)

Translate a texture definition into the internal format used by Tachyon, and returns an opaque pointer to the internal texturing data structure that is passed to object creation routines.

NOTE: This API should be revised and deprecated, but a suitable replacement has not been written yet.

Definition at line 933 of file api.c.

References apitextotex(), and new_standard_texture().

Referenced by drawsp(), GetDirLight(), GetLight(), GetMaterial(), GetScenedefs(), GetSpotLight(), GetTexBody(), main(), NFFGetLight(), NFFGetTexture(), and reset_tex_table().

◆ rt_texture_copy_standard()

void* rt_texture_copy_standard ( SceneHandle  ,
void *  oldtex 
)

Do not use this unless you know what you're doing, this is a short-term workaround until new object types have been created.

Definition at line 967 of file api.c.

References new_standard_texture().

◆ rt_texture_copy_vcstri()

void* rt_texture_copy_vcstri ( SceneHandle  ,
void *  oldtex 
)

Do not use this unless you know what you're doing, this is a short-term workaround until new object types have been created.

Definition at line 973 of file api.c.

References new_vcstri_texture().

Referenced by GetVertexArray(), and rt_tristripscnv3fv().

◆ rt_trans_max_surfaces()

void rt_trans_max_surfaces ( SceneHandle  ,
int  maxsurfaces 
)

Set the maximum number of transparent surfaces that will be rendered.

Definition at line 224 of file api.c.

Referenced by GetShaderMode(), postsceneoptions(), and rt_newscene().

◆ rt_trans_mode()

void rt_trans_mode ( SceneHandle  ,
int  mode 
)

Set transparency rendering mode.

Definition at line 619 of file api.c.

Referenced by GetShaderMode(), postsceneoptions(), and rt_newscene().

◆ rt_tri()

void rt_tri ( SceneHandle  ,
void *  tex,
apivector  v0,
apivector  v1,
apivector  v2 
)

Define a flat-shaded triangle.

Definition at line 1224 of file api.c.

References add_bounded_object(), and newtri().

Referenced by gen_triangles(), GetTPolyFile(), GetTri(), NFFGetPolygon(), rt_heightfield(), and rt_tri_box().

◆ rt_tri3fv()

void rt_tri3fv ( SceneHandle  ,
void *  tex,
const float *  v0,
const float *  v1,
const float *  v2 
)

Define a flat-shaded triangle.

Definition at line 1234 of file api.c.

References add_bounded_object(), and newtri().

◆ rt_tristripscnv3fv()

void rt_tristripscnv3fv ( SceneHandle  scene,
void *  tex,
int  numverts,
const float *  cnv,
int  numstrips,
const int *  vertsperstrip,
const int *  facets 
)

Define smooth-shaded triangle strips using interpolated vertex normals, and per-vertex colors.

All vertex data is stored in a single packed array of 32-bit floating point values formatted with each vertex consisting of colors, normals, and vertices, e.g. CrCgCbNxNyNzVxVyVz. One or multiple triangle strips are defined with a list of facet arrays, where each facet array contains a list of vertex indices.

Definition at line 1332 of file api.c.

References add_bounded_object(), apicolor::b, apicolor::g, newvcstri(), apicolor::r, rt_texture_copy_vcstri(), vcstri_normal_fixup(), apivector::x, apivector::y, and apivector::z.

◆ rt_vcstri()

void rt_vcstri ( SceneHandle  ,
void *  tex,
apivector  v0,
apivector  v1,
apivector  v2,
apivector  n0,
apivector  n1,
apivector  n2,
apicolor  c0,
apicolor  c1,
apicolor  c2 
)

Define a smooth-shaded triangle using interpolated vertex normals and per-vertex colors.

Definition at line 1288 of file api.c.

References add_bounded_object(), newvcstri(), and vcstri_normal_fixup().

Referenced by GetVCSTri(), and GetVertexArray().

◆ rt_vcstri3fv()

void rt_vcstri3fv ( SceneHandle  ,
void *  tex,
const float *  v0,
const float *  v1,
const float *  v2,
const float *  n0,
const float *  n1,
const float *  n2,
const float *  c0,
const float *  c1,
const float *  c2 
)

Define a smooth-shaded triangle using interpolated vertex normals and per-vertex colors.

Definition at line 1303 of file api.c.

References add_bounded_object(), newvcstri(), and vcstri_normal_fixup().

◆ rt_vector()

apivector rt_vector ( flt  x,
flt  y,
flt  z 
)

Helper function to make vectors.

Definition at line 159 of file api.c.

References apivector::x, apivector::y, and apivector::z.

Referenced by GetBackGndGradient(), GetVertexArray(), main(), rt_newscene(), rt_sheightfield(), and rt_tri_box().

◆ rt_verbose()

void rt_verbose ( SceneHandle  ,
int  v 
)

Enables or Disables verbose messages from the Tachyon library during rendering.

(a zero value means off, non-zero means on)

Definition at line 414 of file api.c.

Referenced by GetScenedefs(), main(), NFFGetScenedefs(), postsceneoptions(), and rt_newscene().