Tachyon (current)
Current Main Branch
|
Knot plotting example scene. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "ProfileHooks.h"
#include "stb_image_write.h"
#include "TachyonOptiX.h"
Go to the source code of this file.
Macros | |
#define | STB_IMAGE_WRITE_IMPLEMENTATION |
Functions | |
float * | pq_torus_knot (int p, int q, int points) |
void | HSItoRGB (float h, float s, float i, float &r, float &g, float &b) |
float * | knot_colors (int numpts) |
void | gen_knot (TachyonOptiX *rt, float *coords, float *colors, int numpts, float radius, int mat) |
void | gen_floor (TachyonOptiX *rt, float width, float height, float length, int mat) |
int | main (int argc, const char **argv) |
Knot plotting example scene.
Definition in file knot.cpp.
void gen_floor | ( | TachyonOptiX * | rt, |
float | width, | ||
float | height, | ||
float | length, | ||
int | mat | ||
) |
Definition at line 108 of file knot.cpp.
References TachyonOptiX::add_trimesh(), TriangleMesh::indices, length(), TriangleMesh::vertcolors3f, and TriangleMesh::vertices.
Referenced by main().
void gen_knot | ( | TachyonOptiX * | rt, |
float * | coords, | ||
float * | colors, | ||
int | numpts, | ||
float | radius, | ||
int | mat | ||
) |
Definition at line 84 of file knot.cpp.
References TachyonOptiX::add_spherearray(), SphereArray::center, SphereArray::primcolors3f, and SphereArray::radius.
Referenced by main().
void HSItoRGB | ( | float | h, |
float | s, | ||
float | i, | ||
float & | r, | ||
float & | g, | ||
float & | b | ||
) |
float* knot_colors | ( | int | numpts | ) |
int main | ( | int | argc, |
const char ** | argv | ||
) |
static methods for querying OptiX-supprted GPU hardware independent of whether we actually have an active context.
Definition at line 158 of file knot.cpp.
References TachyonOptiX::add_directional_light(), TachyonOptiX::add_material(), TachyonOptiX::camera_dof_enable(), TachyonOptiX::device_count(), TachyonOptiX::framebuffer_clear(), TachyonOptiX::framebuffer_colorspace(), TachyonOptiX::framebuffer_download_rgb4u(), TachyonOptiX::framebuffer_get_size(), TachyonOptiX::framebuffer_resize(), gen_floor(), gen_knot(), knot_colors(), TachyonOptiX::optix_version(), pq_torus_knot(), TachyonOptiX::print_raystats_info(), PROFILE_POP_RANGE, PROFILE_PUSH_RANGE, TachyonOptiX::render(), TachyonOptiX::RT_BACKGROUND_TEXTURE_SKY_SPHERE, RT_COLORSPACE_sRGB, TachyonOptiX::RT_FOG_NONE, TachyonOptiX::RT_PERSPECTIVE, TachyonOptiX::RT_VERB_MIN, TachyonOptiX::RT_VERB_TIMING, TachyonOptiX::set_aa_samples(), TachyonOptiX::set_ao_ambient(), TachyonOptiX::set_ao_direct(), TachyonOptiX::set_ao_maxdist(), TachyonOptiX::set_ao_samples(), TachyonOptiX::set_bg_color(), TachyonOptiX::set_bg_color_grad_bot(), TachyonOptiX::set_bg_color_grad_top(), TachyonOptiX::set_bg_gradient(), TachyonOptiX::set_bg_gradient_botval(), TachyonOptiX::set_bg_gradient_topval(), TachyonOptiX::set_bg_mode(), TachyonOptiX::set_camera_dof_fnumber(), TachyonOptiX::set_camera_dof_focal_dist(), TachyonOptiX::set_camera_lookat(), TachyonOptiX::set_camera_pos(), TachyonOptiX::set_camera_stereo_convergence_dist(), TachyonOptiX::set_camera_stereo_eyesep(), TachyonOptiX::set_camera_type(), TachyonOptiX::set_camera_zoom(), TachyonOptiX::set_cue_mode(), TachyonOptiX::set_verbose_mode(), TachyonOptiX::shadows_enable(), stbi_flip_vertically_on_write(), and stbi_write_png().