Logo Search packages:      
Sourcecode: yafray version File versions

surfacePoint_t Class Reference

#include <surface.h>

List of all members.


Detailed Description

This holds a sampled point's data

When a ray intersects an object, a surfacePoint_t is computed. It contains data about normal, position, assigned shader and other things.

Definition at line 43 of file surface.h.


Public Member Functions

GFLOAT dudNU () const
GFLOAT dudNV () const
GFLOAT dvdNU () const
GFLOAT dvdNV () const
object3d_t * getObject ()
 Returns the object owner of the point.
const object3d_t * getObject () const
 Returns the object owner of the point.
const void * getOrigin () const
void getScreenPos (PFLOAT &sx, PFLOAT &sy) const
const shader_tgetShader () const
 Returns the surface shader.
void hasOrco (bool b)
bool hasOrco () const
bool hasUV () const
 Returns whatever it has valid UV or not.
bool hasVertexCol () const
 Returns if the point has a valid vertex color.
vector3d_t & N ()
const vector3d_t & N () const
 Returns the normal.
vector3d_t & Ng ()
const vector3d_t & Ng () const
 Returns the geometric normal.
vector3d_t & NU ()
const vector3d_t & NU () const
vector3d_t & NV ()
const vector3d_t & NV () const
const point3d_t & orco () const
point3d_t & orco ()
point3d_t & P ()
 Returns the position.
const point3d_t & P () const
 Returns the position.
void setGradient (GFLOAT uu, GFLOAT uv, GFLOAT vu, GFLOAT vv)
void setObject (object3d_t *o)
 Sets the object owner for a point.
void setOrigin (const void *it)
void setScreenPos (const point3d_t &p)
void setShader (const shader_t *sha)
 Sets the surface shader.
 surfacePoint_t ()
 An empty constructor.
 surfacePoint_t (object3d_t *o, const point3d_t &p, const point3d_t &orc, const vector3d_t &n, const vector3d_t &g, GFLOAT u, GFLOAT v, color_t vcol, PFLOAT d, const shader_t *sha=NULL, bool uv=false, bool hvcol=false, bool horco=false)
 A friend.
GFLOAT & u ()
 Returns a reference to the u texture coord.
GFLOAT u () const
 Returns the u texture coord.
GFLOAT & v ()
 Returns a reference to the v texture coord.
GFLOAT v () const
 Returns the v texture coord.
color_t & vertex_col ()
 Returns reference to the vertex color.
color_t vertex_col () const
 Returns the vertex color.
PFLOAT Z () const
 Returns the depth of the point.
 ~surfacePoint_t ()
 Destructor.

Protected Attributes

GFLOAT dudu
GFLOAT dudv
GFLOAT dvdu
GFLOAT dvdv
bool has_vcol
bool hasorco
bool hasuv
object3d_t * obj
 The object owner of the point.
point3d_t orcoP
const void * originelement
point3d_t screenpos
const shader_tshader
 Surface shader.
vector3d_t suN
 The surface normal.
vector3d_t suNg
 The geometric normal (not smoothed).
vector3d_t suNU
vector3d_t suNV
point3d_t suP
 The point itself.
GFLOAT suU
 surface texture coords
GFLOAT suV
PFLOAT suZ
 Depth from the viewer.
color_t vtxcol

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index