Tachyon (current)  Current Main Branch
Macros | Functions | Variables
plane.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "tachyon.h"
#include "macros.h"
#include "vector.h"
#include "intersect.h"
#include "util.h"
#include "plane.h"

Go to the source code of this file.

Macros

#define TACHYON_INTERNAL   1
 
#define PLANE_PRIVATE
 

Functions

object * newplane (void *tex, vector ctr, vector norm)
 
static int plane_bbox (void *obj, vector *min, vector *max)
 
static void plane_intersect (const plane *pln, ray *ry)
 
static void plane_normal (const plane *pln, const vector *pnt, const ray *incident, vector *N)
 

Variables

static object_methods plane_methods
 

Macro Definition Documentation

◆ PLANE_PRIVATE

#define PLANE_PRIVATE

Definition at line 23 of file plane.c.

◆ TACHYON_INTERNAL

#define TACHYON_INTERNAL   1

Definition at line 16 of file plane.c.

Function Documentation

◆ newplane()

object* newplane ( void *  tex,
vector  ctr,
vector  norm 
)

Definition at line 33 of file plane.c.

References plane_methods, VDot(), and VNorm().

Referenced by rt_plane(), and rt_plane3fv().

◆ plane_bbox()

static int plane_bbox ( void *  obj,
vector *  min,
vector *  max 
)
static

Definition at line 48 of file plane.c.

◆ plane_intersect()

static void plane_intersect ( const plane *  pln,
ray *  ry 
)
static

Definition at line 52 of file plane.c.

◆ plane_normal()

static void plane_normal ( const plane *  pln,
const vector *  pnt,
const ray *  incident,
vector *  N 
)
static

Definition at line 70 of file plane.c.

References VDot().

Variable Documentation

◆ plane_methods

object_methods plane_methods
static
Initial value:
= {
(void (*)(const void *, void *))(plane_intersect),
(void (*)(const void *, const void *, const void *, void *))(plane_normal),
free
}
static int plane_bbox(void *obj, vector *min, vector *max)
Definition: plane.c:48
static void plane_normal(const plane *pln, const vector *pnt, const ray *incident, vector *N)
Definition: plane.c:70
static void plane_intersect(const plane *pln, ray *ry)
Definition: plane.c:52

Definition at line 26 of file plane.c.

Referenced by newplane().