DD::Image::rPrimitive Class Reference

Inherits DD::Image::Box3.

Inherited by DD::Image::rPoint, and DD::Image::rTriangle.

List of all members.

Public Member Functions

virtual const char * Class ()
 rPrimitive (const GeoInfo *info, const Primitive *p)
 rPrimitive (const rPrimitive &)
virtual ~rPrimitive ()
virtual rPrimitiveduplicate () const
const GeoInfogeoinfo () const
const Primitiveparent () const
bool cast_shadows () const
bool receive_shadows () const
virtual bool add_to_render (Scene *, PrimitiveContext *)=0
virtual bool add_to_displacement_render (Scene *, PrimitiveContext *)
virtual bool intersect (float x, float y) const =0
virtual bool intersect (float x, float y, float *dist) const =0
virtual bool intersect_dist_squared (float x, float y, float *dist_squared) const =0
virtual bool intersect_scanline (float y, int &X, int &R, VArray &v0, VArray &du, VArray &dv) const =0
virtual float trace (Scene *)=0
virtual float distance (float x, float y) const =0
virtual float distance_squared (float x, float y) const =0
virtual void subdivide (std::vector< rPrimitive * > &primitives, SubdivisionContext *stx)
void * operator new (size_t size)
void operator delete (void *mem)
void * operator new[] (size_t size)
void operator delete[] (void *mem)

Protected Attributes

const GeoInfogeoinfo_
 Parent object.
const Primitiveparent_
 What primitive generated us.


Detailed Description

Rendering primitive parent class. These objects are usually created by a 'Primitive' subclass when rendering is done. The primary difference between two classes is that the 'Primitive' always remains in scene space, or world space, and a rPrimitive is allocated per render sample and transformed into clip and screen space. These objects are destroyed after rendering is complete.

Constructor & Destructor Documentation

rPrimitive::rPrimitive ( const GeoInfo info,
const Primitive p 
)

This is the base class of anything renderable!

We use this class to handle renderable objects that can have simple geometry such as triangles, spheres, etc.

rPrimitive::rPrimitive ( const rPrimitive b  ) 

Copy constructor.

rPrimitive::~rPrimitive (  )  [virtual]

Base destructor does nothing.



©2009 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk