lux::LoopSubdiv Class Reference

#include <loopsubdiv.h>

Inheritance diagram for lux::LoopSubdiv:

lux::Shape

List of all members.

Public Member Functions

 LoopSubdiv (const Transform &o2w, bool ro, int nt, int nv, const int *vi, const Point *P, const float *uv, int nlevels, const boost::shared_ptr< Texture< float > > dismap, float dmscale, float dmoffset, bool dmnormalsmooth, bool dmsharpboundary)
 ~LoopSubdiv ()
bool CanIntersect () const
void Refine (vector< boost::shared_ptr< Shape > > &refined) const
BBox ObjectBound () const
BBox WorldBound () const

Static Public Member Functions

static ShapeCreateShape (const Transform &o2w, bool reverseOrientation, const ParamSet &params, map< string, boost::shared_ptr< Texture< float > > > *floatTextures)

Private Member Functions

float beta (int valence) const
void weightOneRing (SDVertex *destVert, SDVertex *vert, float beta) const
void weightBoundary (SDVertex *destVert, SDVertex *vert, float beta) const
float gamma (int valence) const
void ApplyDisplacementMap (const vector< SDVertex * > verts, const Normal *norms, const float *uvs) const

Static Private Member Functions

static void GenerateNormals (const vector< SDVertex * > verts, vector< Normal > &Ns)

Private Attributes

int nLevels
vector< SDVertex * > vertices
vector< SDFace * > faces
boost::shared_ptr< Texture
< float > > 
displacementMap
float displacementMapScale
float displacementMapOffset
bool hasUV
bool displacementMapNormalSmooth
bool displacementMapSharpBoundary


Detailed Description

Definition at line 123 of file loopsubdiv.h.


Constructor & Destructor Documentation

LoopSubdiv::LoopSubdiv ( const Transform o2w,
bool  ro,
int  nt,
int  nv,
const int *  vi,
const Point P,
const float *  uv,
int  nlevels,
const boost::shared_ptr< Texture< float > >  dismap,
float  dmscale,
float  dmoffset,
bool  dmnormalsmooth,
bool  dmsharpboundary 
)

LoopSubdiv::~LoopSubdiv (  ) 

Definition at line 114 of file loopsubdiv.cpp.

References faces, and vertices.


Member Function Documentation

void LoopSubdiv::ApplyDisplacementMap ( const vector< SDVertex * >  verts,
const Normal norms,
const float *  uvs 
) const [private]

float lux::LoopSubdiv::beta ( int  valence  )  const [inline, private]

Definition at line 144 of file loopsubdiv.h.

Referenced by gamma(), and Refine().

bool LoopSubdiv::CanIntersect (  )  const [virtual]

Reimplemented from lux::Shape.

Definition at line 135 of file loopsubdiv.cpp.

Shape * LoopSubdiv::CreateShape ( const Transform o2w,
bool  reverseOrientation,
const ParamSet params,
map< string, boost::shared_ptr< Texture< float > > > *  floatTextures 
) [static]

float lux::LoopSubdiv::gamma ( int  valence  )  const [inline, private]

Definition at line 150 of file loopsubdiv.h.

References beta().

Referenced by Refine().

void LoopSubdiv::GenerateNormals ( const vector< SDVertex * >  verts,
vector< Normal > &  Ns 
) [static, private]

BBox LoopSubdiv::ObjectBound (  )  const [virtual]

Implements lux::Shape.

Definition at line 119 of file loopsubdiv.cpp.

References lux::Union(), and vertices.

void LoopSubdiv::Refine ( vector< boost::shared_ptr< Shape > > &  refined  )  const [virtual]

void LoopSubdiv::weightBoundary ( SDVertex destVert,
SDVertex vert,
float  beta 
) const [private]

void LoopSubdiv::weightOneRing ( SDVertex destVert,
SDVertex vert,
float  beta 
) const [private]

BBox LoopSubdiv::WorldBound (  )  const [virtual]

Reimplemented from lux::Shape.

Definition at line 127 of file loopsubdiv.cpp.

References lux::Shape::ObjectToWorld, lux::Union(), and vertices.


Member Data Documentation

boost::shared_ptr<Texture<float> > lux::LoopSubdiv::displacementMap [private]

Definition at line 166 of file loopsubdiv.h.

Referenced by ApplyDisplacementMap(), CreateShape(), and Refine().

Definition at line 170 of file loopsubdiv.h.

Referenced by CreateShape(), and Refine().

Definition at line 168 of file loopsubdiv.h.

Referenced by ApplyDisplacementMap(), and CreateShape().

Definition at line 167 of file loopsubdiv.h.

Referenced by ApplyDisplacementMap(), and CreateShape().

Definition at line 170 of file loopsubdiv.h.

Referenced by CreateShape(), and weightBoundary().

vector<SDFace *> lux::LoopSubdiv::faces [private]

Definition at line 163 of file loopsubdiv.h.

Referenced by LoopSubdiv(), Refine(), and ~LoopSubdiv().

bool lux::LoopSubdiv::hasUV [private]

Definition at line 170 of file loopsubdiv.h.

Referenced by LoopSubdiv(), and Refine().

int lux::LoopSubdiv::nLevels [private]

Definition at line 161 of file loopsubdiv.h.

Referenced by LoopSubdiv(), and Refine().

vector<SDVertex *> lux::LoopSubdiv::vertices [private]

Definition at line 162 of file loopsubdiv.h.

Referenced by LoopSubdiv(), ObjectBound(), Refine(), WorldBound(), and ~LoopSubdiv().


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

Generated on Mon May 18 07:15:19 2009 for lux by  doxygen 1.5.7.1