primitive_t Class Reference

#include <primitive.h>

Inheritance diagram for primitive_t:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bound_t getBound () const =0
virtual bool intersectsBound (exBound_t &b) const
virtual bool clippingSupport () const
virtual bool clipToBound (double bound[2][3], int axis, bound_t &clipped, void *d_old, void *d_new) const
virtual bool intersect (const ray_t &ray, PFLOAT *t, void *userdata) const =0
virtual void getSurface (surfacePoint_t &sp, const point3d_t &hit, void *userdata) const =0
virtual const material_tgetMaterial () const =0
virtual ~primitive_t ()

Detailed Description

Definition at line 16 of file primitive.h.


Constructor & Destructor Documentation

virtual primitive_t::~primitive_t (  )  [inline, virtual]

Definition at line 40 of file primitive.h.


Member Function Documentation

virtual bool primitive_t::clippingSupport (  )  const [inline, virtual]

indicate if the object has a clipping implementation

Reimplemented in vTriangle_t.

Definition at line 26 of file primitive.h.

virtual bool primitive_t::clipToBound ( double  bound[2][3],
int  axis,
bound_t clipped,
void *  d_old,
void *  d_new 
) const [inline, virtual]

calculate the overlapping box of given bound and primitive

Returns:
: false:=doesn't overlap bound; true:=valid clip exists

Reimplemented in vTriangle_t.

Definition at line 29 of file primitive.h.

virtual bound_t primitive_t::getBound (  )  const [pure virtual]

return the object bound in global ("world") coordinates

Implemented in sphere_t, vTriangle_t, and bsTriangle_t.

virtual const material_t* primitive_t::getMaterial (  )  const [pure virtual]

Implemented in sphere_t, vTriangle_t, and bsTriangle_t.

virtual void primitive_t::getSurface ( surfacePoint_t sp,
const point3d_t hit,
void *  userdata 
) const [pure virtual]

Implemented in sphere_t, vTriangle_t, and bsTriangle_t.

virtual bool primitive_t::intersect ( const ray_t ray,
PFLOAT *  t,
void *  userdata 
) const [pure virtual]

basic ray primitive interection for raytracing. This should NOT skip intersections outside of [tmin,tmax], unless negative. The caller decides wether t matters or not.

Returns:
false if ray misses primitive, true otherwise
Parameters:
t set this to raydepth where hit occurs

Implemented in sphere_t, vTriangle_t, and bsTriangle_t.

virtual bool primitive_t::intersectsBound ( exBound_t b  )  const [inline, virtual]

a possibly more precise check to find out if the primitve really intersects the bound of interest, given that the primitive's bound does. used e.g. for optimized kd-tree construction

Reimplemented in sphere_t, and vTriangle_t.

Definition at line 24 of file primitive.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 18 Dec 2009 for YafaRay by  doxygen 1.6.1