Blender V2.61 - r43446
Classes | Functions

rayobject_rtbuild.cpp File Reference

#include <assert.h>
#include <math.h>
#include <stdlib.h>
#include <algorithm>
#include "rayobject_rtbuild.h"
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"

Go to the source code of this file.

Classes

struct  SweepCost

Functions

static bool selected_node (RTBuilder::Object *node)
static void rtbuild_init (RTBuilder *b)
RTBuilderrtbuild_create (int size)
void rtbuild_free (RTBuilder *b)
void rtbuild_add (RTBuilder *b, RayObject *o)
int rtbuild_size (RTBuilder *b)
template<class Obj , int Axis>
static bool obj_bb_compare (const Obj &a, const Obj &b)
template<class Item >
static void object_sort (Item *begin, Item *end, int axis)
void rtbuild_done (RTBuilder *b, RayObjectControl *ctrl)
RayObjectrtbuild_get_primitive (RTBuilder *b, int index)
RTBuilderrtbuild_get_child (RTBuilder *b, int child, RTBuilder *tmp)
void rtbuild_calc_bb (RTBuilder *b)
void rtbuild_merge_bb (RTBuilder *b, float *min, float *max)
int rtbuild_heuristic_object_split (RTBuilder *b, int nchilds)
float bb_volume (float *min, float *max)
float bb_area (float *min, float *max)
int bb_largest_axis (float *min, float *max)
int bb_fits_inside (float *outer_min, float *outer_max, float *inner_min, float *inner_max)

Detailed Description

Definition in file rayobject_rtbuild.cpp.


Function Documentation

float bb_area ( float *  min,
float *  max 
)
int bb_fits_inside ( float *  outer_min,
float *  outer_max,
float *  inner_min,
float *  inner_max 
)

Definition at line 519 of file rayobject_rtbuild.cpp.

References i.

Referenced by hint_test_bb(), node_fits_inside(), and pushdown().

int bb_largest_axis ( float *  min,
float *  max 
)

Definition at line 496 of file rayobject_rtbuild.cpp.

float bb_volume ( float *  min,
float *  max 
)

Definition at line 477 of file rayobject_rtbuild.cpp.

template<class Obj , int Axis>
static bool obj_bb_compare ( const Obj &  a,
const Obj &  b 
) [static]

Definition at line 142 of file rayobject_rtbuild.cpp.

template<class Item >
static void object_sort ( Item *  begin,
Item *  end,
int  axis 
) [static]

Definition at line 150 of file rayobject_rtbuild.cpp.

References assert, and sort().

Referenced by rtbuild_done().

void rtbuild_add ( RTBuilder b,
RayObject o 
)
void rtbuild_calc_bb ( RTBuilder b)
RTBuilder* rtbuild_create ( int  size)
void rtbuild_done ( RTBuilder b,
RayObjectControl ctrl 
)
void rtbuild_free ( RTBuilder b)
RTBuilder* rtbuild_get_child ( RTBuilder b,
int  child,
RTBuilder tmp 
)
RayObject* rtbuild_get_primitive ( RTBuilder b,
int  index 
)

Definition at line 168 of file rayobject_rtbuild.cpp.

References RTBuilder::sorted_begin.

Referenced by BuildBinaryVBVH< Node >::_transform().

int rtbuild_heuristic_object_split ( RTBuilder b,
int  nchilds 
)
static void rtbuild_init ( RTBuilder b) [static]
void rtbuild_merge_bb ( RTBuilder b,
float *  min,
float *  max 
)

Definition at line 201 of file rayobject_rtbuild.cpp.

References RTBuilder::bb, DO_MAX, DO_MIN, and rtbuild_calc_bb().

Referenced by BuildBinaryVBVH< Node >::_transform().

int rtbuild_size ( RTBuilder b)
static bool selected_node ( RTBuilder::Object node) [static]

Definition at line 45 of file rayobject_rtbuild.cpp.

References RTBuilder::Object::selected.

Referenced by rtbuild_heuristic_object_split().