lux::LoopSubdiv Class Reference

#include <loopsubdiv.h>

Inheritance diagram for lux::LoopSubdiv:
[legend]
Collaboration diagram for lux::LoopSubdiv:
[legend]

List of all members.

Classes

class  SubdivResult

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)
virtual ~LoopSubdiv ()
virtual bool CanIntersect () const
virtual void Refine (vector< boost::shared_ptr< Shape > > &refined) const
virtual BBox ObjectBound () const
virtual BBox WorldBound () const
boost::shared_ptr< SubdivResultRefine () const

Static Public Member Functions

static ShapeCreateShape (const Transform &o2w, bool reverseOrientation, const ParamSet &params)

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, 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
boost::shared_ptr< ShaperefinedShape

Detailed Description

Definition at line 121 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 (  )  [virtual]

Definition at line 129 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 168 of file loopsubdiv.h.

Referenced by gamma(), and Refine().

bool LoopSubdiv::CanIntersect (  )  const [virtual]

Returns whether this primitive can be intersected.

Reimplemented from lux::Shape.

Definition at line 150 of file loopsubdiv.cpp.

Shape * LoopSubdiv::CreateShape ( const Transform o2w,
bool  reverseOrientation,
const ParamSet params 
) [static]
float lux::LoopSubdiv::gamma ( int  valence  )  const [inline, private]

Definition at line 174 of file loopsubdiv.h.

References beta().

Referenced by Refine().

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

Reimplemented from lux::Shape.

Definition at line 134 of file loopsubdiv.cpp.

References b, lux::Union(), and vertices.

boost::shared_ptr< LoopSubdiv::SubdivResult > LoopSubdiv::Refine (  )  const
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]

Returns the world bounds of this primitive.

Reimplemented from lux::Shape.

Definition at line 142 of file loopsubdiv.cpp.

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


Member Data Documentation

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

Definition at line 190 of file loopsubdiv.h.

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

Definition at line 194 of file loopsubdiv.h.

Referenced by CreateShape(), and Refine().

Definition at line 192 of file loopsubdiv.h.

Referenced by ApplyDisplacementMap(), and CreateShape().

Definition at line 191 of file loopsubdiv.h.

Referenced by ApplyDisplacementMap(), and CreateShape().

Definition at line 194 of file loopsubdiv.h.

Referenced by CreateShape(), and weightBoundary().

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

Definition at line 187 of file loopsubdiv.h.

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

bool lux::LoopSubdiv::hasUV [private]

Definition at line 194 of file loopsubdiv.h.

Referenced by LoopSubdiv(), and Refine().

Definition at line 185 of file loopsubdiv.h.

Referenced by LoopSubdiv(), and Refine().

boost::shared_ptr<Shape> lux::LoopSubdiv::refinedShape [mutable, private]

Definition at line 197 of file loopsubdiv.h.

Referenced by Refine().

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

Definition at line 186 of file loopsubdiv.h.

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


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.2-20100208