Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

RadElem Class Reference

#include <RadMesh.h>

Inheritance diagram for RadElem:

NbRadElem HierElem GridBase HRMeshElem AnaGrid RadGrid HierGrid HaarElem

Collaboration diagram for RadElem:

List of all members.


Public Members

 RadElem ()
virtual ~RadElem ()
virtual Void Draw (Renderer &r)
Void Compare (RadElem *to, GCLReal edgeLen, CompareStats &stats)
virtual Colour Sample (Coord c)
Sample radiosity at this coord.

Coord FindCoord (Point &p)
transform point on surface into elem's coord sys.

virtual RadElem* FindContainer (Coord &coord)
Find the elem containing this coord.

virtual Colour SampleLeaf (Coord c)
Sample radiosity of this elem, rather than descendants.

GCLReal EstPatchFactor (const Point &p, const Vector &n)
dA->dA form factor.

GCLReal PatchFactor (const Point &p, const Vector &n)
A->dA form factor from elem to elemental surface dS.

GCLReal ApproxPatchFactor (const Point &p, const Vector &np)
Combines EstPatchFactor and PatchFactor according to an approximation oracle.

GCLReal EstFormFactor (RadElem *to)
Returns an estimate of the form factor from this patch to 'to' by calling one of the above methods.

GCLReal EdgeArea (const Vector &p, const Vector &q, const Vector &n)
GCLReal SampledFormFactor (Int n, RadElem *to, GCLReal &error)
Int OrientInfo (RadElem *to)
GCLReal Visibility (RadElem *to)
GCLReal CentreVis (const Point &p, const Vector &n)
GCLReal Visibility16 (const Point &p, const Vector &n)
Bool PotentiallyVis (RadElem *to)
Bool PotentiallyVisAndTouching (RadElem *to, Bool &touching)
GCLReal Visibility44 (RadElem *to)
Void SetVisPoints (Point p[])
GCLReal RadVis4x4 (RadElem *to)
GCLReal RadVis16x1 (const Point &p, const Vector &n)
virtual Void ColourVertices (Int weights[])
Push element radiosities to vertices.

virtual Void CreatePatches (PatchList &patches)
Split Elem into patches s.t. area < maxPatchSize.

virtual Void Print (ostream &s)
virtual Void Parse (istream &s)
virtual Void Reanimate (RadElem *parent)
virtual StrConst Name ()
Void SetProps (RadProps *props)
Void SetHighlight (Int h)
Void DrawHighlight (Renderer &r)
Void RaiseVertex (Renderer &r, Int i)
Used in function-view rendering.

Void SetColour (const Colour &c)
Vector& Vertex (Int i)
Colour& VtxClr (Int i)
Vector& Normal (Int i)
Coord& TexCoord (Int i)
Void SetIndexes ( Int dstIdx, RadElem *src, Int srcIdx )
Void SetAllIndexes ( RadElem *s0, Int i0, RadElem *s1, Int i1, RadElem *s2, Int i2, RadElem *s3, Int i3 )
Vector& Normal ()
Vector& Centre ()
Colour& Emittance ()
Colour& Reflectance ()
Int Sides ()
Bool IsTri ()
Bool IsQuad ()
Bool IsTextured ()
Bool HasNormals ()
Void SendPoints (Renderer &r)
virtual GCLReal MemoryUse ()
Int index [4]
Indices of corner vertices.

Int clrIdx [4]
Indices of corner colours.

Int normIdx [4]
Indices of corner normals.

Int texIdx [4]
Indices of corner texture coords.

RadPropsprops
elements of this mesh.

Point centre
centre of this elem.

Vector normal
normal at the centre.

Colour colour
face colour -- shift this to array?

GCLReal area
area of the quad/tri.


Static Public Members

Int sGridMem = 0
Int sGridChildMem = 0


Detailed Description


    Edge and vertex numbering for a quad element is as follows:

               3

            +-----+
            |0   3|
        0   |     |   2
            |1   2|
            +-----+

               1
               
    Numbering for triangular elements is as follows:

            0
            |\   
            | \  2
         0  |  \
            |   \
            +----+
           1      2
               1
           
    In general: vertex numbering is counter-clockwise from the upper-left, 
    and edge i is the edge from vertices i to (i + 1) % m.

    Thus index[0] is index of top-left vertex, etc.

    A triangle has three valid indices, with index[3] = -1.

    A quad is parameterised by [s, t] as follows:
        v[1] + s(v[2] - v[1]) + t(v[0] - v[1]): s, t E [0, 1]
    A tri is parameterised by :
        (1 - s - t) v[0] + sv[1] + tv[2]: s, t, s + t E [0, 1]
    
    There are also colour indices for each corner of the quad/tri, which lets
    us share colours for internal mesh vertices and along polys that share
    normals & surface attributes.

    

Definition at line 84 of file RadMesh.h.


Constructor & Destructor Documentation

RadElem::RadElem ()

Definition at line 116 of file RadMesh.cc.

RadElem::~RadElem () [virtual]

Definition at line 124 of file RadMesh.cc.


Member Function Documentation

GCLReal RadElem::ApproxPatchFactor (const Point & p, const Vector & np)

Combines EstPatchFactor and PatchFactor according to an approximation oracle.

Definition at line 460 of file RadMesh.cc.

Vector & RadElem::Centre () [inline]

Definition at line 201 of file RadMesh.h.

GCLReal RadElem::CentreVis (const Point & p, const Vector & n)

Definition at line 753 of file RadMesh.cc.

Void RadElem::ColourVertices (Int weights[]) [inline, virtual]

Push element radiosities to vertices.

Reimplemented in HierElem, HierGrid, and RadGrid.

Definition at line 673 of file RadMesh.cc.

Void RadElem::Compare (RadElem * to, GCLReal edgeLen, CompareStats & stats)

Definition at line 269 of file RadMesh.cc.

Void RadElem::CreatePatches (PatchList & patches) [inline, virtual]

Split Elem into patches s.t. area < maxPatchSize.

Reimplemented in HierElem, HierGrid, HRMeshElem, and RadGrid.

Definition at line 684 of file RadMesh.cc.

Void RadElem::Draw (Renderer & r) [virtual]

Reimplemented in HierElem, HierGrid, HRMeshElem, and RadGrid.

Definition at line 155 of file RadMesh.cc.

Void RadElem::DrawHighlight (Renderer & r)

Definition at line 139 of file RadMesh.cc.

GCLReal RadElem::EdgeArea (const Vector & p, const Vector & q, const Vector & n)

Definition at line 391 of file RadMesh.cc.

Colour & RadElem::Emittance () [inline]

Definition at line 202 of file RadMesh.h.

GCLReal RadElem::EstFormFactor (RadElem * to)

Returns an estimate of the form factor from this patch to 'to' by calling one of the above methods.

Definition at line 499 of file RadMesh.cc.

GCLReal RadElem::EstPatchFactor (const Point & p, const Vector & n)

dA->dA form factor.

Definition at line 360 of file RadMesh.cc.

RadElem * RadElem::FindContainer (Coord & coord) [inline, virtual]

Find the elem containing this coord.

Reimplemented in HierElem, HierGrid, and RadGrid.

Definition at line 224 of file RadMesh.cc.

Coord RadElem::FindCoord (Point & p)

transform point on surface into elem's coord sys.

Definition at line 1073 of file RadMesh.cc.

Bool RadElem::HasNormals () [inline]

Definition at line 213 of file RadMesh.h.

Bool RadElem::IsQuad () [inline]

Definition at line 211 of file RadMesh.h.

Bool RadElem::IsTextured () [inline]

Definition at line 212 of file RadMesh.h.

Bool RadElem::IsTri () [inline]

Definition at line 210 of file RadMesh.h.

GCLReal RadElem::MemoryUse () [virtual]

Reimplemented in HierElem, HierGrid, NbRadElem, and RadGrid.

Definition at line 1141 of file RadMesh.cc.

StrConst RadElem::Name () [virtual]

Reimplemented in HaarElem, HierElem, HierGrid, and RadGrid.

Definition at line 335 of file RadMesh.cc.

Vector & RadElem::Normal () [inline]

Definition at line 200 of file RadMesh.h.

Vector & RadElem::Normal (Int i) [inline]

Definition at line 180 of file RadMesh.h.

Int RadElem::OrientInfo (RadElem * to)

Definition at line 602 of file RadMesh.cc.

Void RadElem::Parse (istream & s) [virtual]

Reimplemented in HierElem, HierGrid, and RadGrid.

Definition at line 349 of file RadMesh.cc.

GCLReal RadElem::PatchFactor (const Point & p, const Vector & n)

A->dA form factor from elem to elemental surface dS.

Definition at line 425 of file RadMesh.cc.

Bool RadElem::PotentiallyVis (RadElem * to)

Definition at line 804 of file RadMesh.cc.

Bool RadElem::PotentiallyVisAndTouching (RadElem * to, Bool & touching)

Definition at line 838 of file RadMesh.cc.

Void RadElem::Print (ostream & s) [virtual]

Reimplemented in HaarElem, HierElem, HierGrid, HRMeshElem, and RadGrid.

Definition at line 340 of file RadMesh.cc.

GCLReal RadElem::RadVis16x1 (const Point & p, const Vector & n)

Definition at line 1037 of file RadMesh.cc.

GCLReal RadElem::RadVis4x4 (RadElem * to)

Definition at line 994 of file RadMesh.cc.

Void RadElem::RaiseVertex (Renderer & r, Int i)

Used in function-view rendering.

Definition at line 689 of file RadMesh.cc.

Void RadElem::Reanimate (RadElem * parent) [virtual]

Reimplemented in HierElem, HierGrid, and RadGrid.

Definition at line 667 of file RadMesh.cc.

Colour & RadElem::Reflectance () [inline]

Definition at line 206 of file RadMesh.h.

Colour RadElem::Sample (Coord c) [inline, virtual]

Sample radiosity at this coord.

Reimplemented in AnaGrid.

Definition at line 259 of file RadMesh.cc.

Colour RadElem::SampleLeaf (Coord c) [inline, virtual]

Sample radiosity of this elem, rather than descendants.

Reimplemented in HaarElem.

Definition at line 229 of file RadMesh.cc.

GCLReal RadElem::SampledFormFactor (Int n, RadElem * to, GCLReal & error)

Samples patch factor over n x n panes of the element to estimate form factor.

Definition at line 565 of file RadMesh.cc.

Void RadElem::SendPoints (Renderer & r) [inline]

Definition at line 214 of file RadMesh.h.

Void RadElem::SetAllIndexes (RadElem * s0, Int i0, RadElem * s1, Int i1, RadElem * s2, Int i2, RadElem * s3, Int i3)

Definition at line 1109 of file RadMesh.cc.

Void RadElem::SetColour (const Colour & c) [inline]

Parameters:
c   Set face colour.

Reimplemented in HierElem.

Definition at line 173 of file RadMesh.h.

Void RadElem::SetHighlight (Int h)

Reimplemented in HRMeshElem.

Definition at line 328 of file RadMesh.cc.

Void RadElem::SetIndexes (Int dstIdx, RadElem * src, Int srcIdx)

Definition at line 1097 of file RadMesh.cc.

Void RadElem::SetProps (RadProps * parentProps)

Definition at line 636 of file RadMesh.cc.

Void RadElem::SetVisPoints (Point p[])

Int RadElem::Sides () [inline]

Definition at line 208 of file RadMesh.h.

Coord & RadElem::TexCoord (Int i) [inline]

Definition at line 181 of file RadMesh.h.

Vector & RadElem::Vertex (Int i) [inline]

Definition at line 178 of file RadMesh.h.

GCLReal RadElem::Visibility (RadElem * to)

Definition at line 915 of file RadMesh.cc.

GCLReal RadElem::Visibility16 (const Point & p, const Vector & n)

Definition at line 724 of file RadMesh.cc.

GCLReal RadElem::Visibility44 (RadElem * to)

Definition at line 904 of file RadMesh.cc.

Colour & RadElem::VtxClr (Int i) [inline]

Definition at line 179 of file RadMesh.h.


Member Data Documentation

GCLReal RadElem::area

area of the quad/tri.

Definition at line 99 of file RadMesh.h.

Point RadElem::centre

centre of this elem.

Definition at line 96 of file RadMesh.h.

Int RadElem::clrIdx[4]

Indices of corner colours.

Definition at line 91 of file RadMesh.h.

Colour RadElem::colour

face colour -- shift this to array?

Definition at line 98 of file RadMesh.h.

Int RadElem::index[4]

Indices of corner vertices.

Definition at line 90 of file RadMesh.h.

Int RadElem::normIdx[4]

Indices of corner normals.

Definition at line 92 of file RadMesh.h.

Vector RadElem::normal

normal at the centre.

Definition at line 97 of file RadMesh.h.

RadProps * RadElem::props

elements of this mesh.

Definition at line 94 of file RadMesh.h.

Int RadElem::sGridChildMem = 0 [static]

Definition at line 222 of file RadMesh.h.

Int RadElem::sGridMem = 0 [static]

Definition at line 221 of file RadMesh.h.

Int RadElem::texIdx[4]

Indices of corner texture coords.

Definition at line 93 of file RadMesh.h.


The documentation for this class was generated from the following files:
Generated at Sat Aug 5 00:26:59 2000 for Radiator by doxygen 1.1.0 written by Dimitri van Heesch, © 1997-2000