osg::SkyBackground Class Reference
[Backgrounds]

Background clearing class using a sky sphere and box. See Sky Background for a description. More...

#include <OSGSkyBackground.h>

Inheritance diagram for osg::SkyBackground:

osg::SkyBackgroundBase osg::Background osg::BackgroundBase osg::AttachmentContainer osg::FieldContainer

List of all members.

Public Types

enum  {
  SkyColorFieldId = Inherited::NextFieldId, SkyAngleFieldId = SkyColorFieldId + 1, GroundColorFieldId = SkyAngleFieldId + 1, GroundAngleFieldId = GroundColorFieldId + 1,
  SphereResFieldId = GroundAngleFieldId + 1, BackTextureFieldId = SphereResFieldId + 1, BottomTextureFieldId = BackTextureFieldId + 1, FrontTextureFieldId = BottomTextureFieldId + 1,
  LeftTextureFieldId = FrontTextureFieldId + 1, RightTextureFieldId = LeftTextureFieldId + 1, TopTextureFieldId = RightTextureFieldId + 1, BoxInsideFieldId = TopTextureFieldId + 1,
  TopTexCoordFieldId = BoxInsideFieldId + 1, BottomTexCoordFieldId = TopTexCoordFieldId + 1, RightTexCoordFieldId = BottomTexCoordFieldId + 1, LeftTexCoordFieldId = RightTexCoordFieldId + 1,
  FrontTexCoordFieldId = LeftTexCoordFieldId + 1, BackTexCoordFieldId = FrontTexCoordFieldId + 1, BeaconFieldId = BackTexCoordFieldId + 1, ClearStencilBitFieldId = BeaconFieldId + 1,
  NextFieldId = ClearStencilBitFieldId + 1
}
typedef SkyBackgroundPtr Ptr
enum  { AttachmentsFieldId = Inherited::NextFieldId, NextFieldId = AttachmentsFieldId + 1 }
enum  { NextFieldId = 1 }

Public Member Functions

Sync


virtual void changed (BitVector whichField, UInt32 origin)
Background


virtual void clear (DrawActionBase *action, Viewport *port)
Output


virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
FieldContainer Get


virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get


MFColor4fgetMFSkyColor (void)
 Get the SkyBackground::_mfSkyColor field.
MFReal32getMFSkyAngle (void)
 Get the SkyBackground::_mfSkyAngle field.
MFColor4fgetMFGroundColor (void)
 Get the SkyBackground::_mfGroundColor field.
MFReal32getMFGroundAngle (void)
 Get the SkyBackground::_mfGroundAngle field.
SFUInt32getSFSphereRes (void)
 Get the SkyBackground::_sfSphereRes field.
SFTextureChunkPtrgetSFBackTexture (void)
 Get the SkyBackground::_sfBackTexture field.
SFTextureChunkPtrgetSFBottomTexture (void)
 Get the SkyBackground::_sfBottomTexture field.
SFTextureChunkPtrgetSFFrontTexture (void)
 Get the SkyBackground::_sfFrontTexture field.
SFTextureChunkPtrgetSFLeftTexture (void)
 Get the SkyBackground::_sfLeftTexture field.
SFTextureChunkPtrgetSFRightTexture (void)
 Get the SkyBackground::_sfRightTexture field.
SFTextureChunkPtrgetSFTopTexture (void)
 Get the SkyBackground::_sfTopTexture field.
SFBoolgetSFBoxInside (void)
 Get the SkyBackground::_sfBoxInside field.
MFVec3fgetMFTopTexCoord (void)
 Get the SkyBackground::_mfTopTexCoord field.
MFVec3fgetMFBottomTexCoord (void)
 Get the SkyBackground::_mfBottomTexCoord field.
MFVec3fgetMFRightTexCoord (void)
 Get the SkyBackground::_mfRightTexCoord field.
MFVec3fgetMFLeftTexCoord (void)
 Get the SkyBackground::_mfLeftTexCoord field.
MFVec3fgetMFFrontTexCoord (void)
 Get the SkyBackground::_mfFrontTexCoord field.
MFVec3fgetMFBackTexCoord (void)
 Get the SkyBackground::_mfBackTexCoord field.
SFNodePtrgetSFBeacon (void)
 Get the SkyBackground::_sfBeacon field.
SFInt32getSFClearStencilBit (void)
 Get the SkyBackground::_sfClearStencilBit field.
UInt32getSphereRes (void)
 Get the value of the SkyBackground::_sfSphereRes field.
const UInt32getSphereRes (void) const
 Get the value of the SkyBackground::_sfSphereRes field.
TextureChunkPtrgetBackTexture (void)
 Get the value of the SkyBackground::_sfBackTexture field.
const TextureChunkPtrgetBackTexture (void) const
 Get the value of the SkyBackground::_sfBackTexture field.
TextureChunkPtrgetBottomTexture (void)
 Get the value of the SkyBackground::_sfBottomTexture field.
const TextureChunkPtrgetBottomTexture (void) const
 Get the value of the SkyBackground::_sfBottomTexture field.
TextureChunkPtrgetFrontTexture (void)
 Get the value of the SkyBackground::_sfFrontTexture field.
const TextureChunkPtrgetFrontTexture (void) const
 Get the value of the SkyBackground::_sfFrontTexture field.
TextureChunkPtrgetLeftTexture (void)
 Get the value of the SkyBackground::_sfLeftTexture field.
const TextureChunkPtrgetLeftTexture (void) const
 Get the value of the SkyBackground::_sfLeftTexture field.
TextureChunkPtrgetRightTexture (void)
 Get the value of the SkyBackground::_sfRightTexture field.
const TextureChunkPtrgetRightTexture (void) const
 Get the value of the SkyBackground::_sfRightTexture field.
TextureChunkPtrgetTopTexture (void)
 Get the value of the SkyBackground::_sfTopTexture field.
const TextureChunkPtrgetTopTexture (void) const
 Get the value of the SkyBackground::_sfTopTexture field.
bool & getBoxInside (void)
 Get the value of the SkyBackground::_sfBoxInside field.
const bool & getBoxInside (void) const
 Get the value of the SkyBackground::_sfBoxInside field.
NodePtrgetBeacon (void)
 Get the value of the SkyBackground::_sfBeacon field.
const NodePtrgetBeacon (void) const
 Get the value of the SkyBackground::_sfBeacon field.
Int32getClearStencilBit (void)
 Get the value of the SkyBackground::_sfClearStencilBit field.
const Int32getClearStencilBit (void) const
 Get the value of the SkyBackground::_sfClearStencilBit field.
Color4fgetSkyColor (const UInt32 index)
 Get the value of the index element the SkyBackground::_mfSkyColor field.
MFColor4fgetSkyColor (void)
 Get the SkyBackground::_mfSkyColor field.
const MFColor4fgetSkyColor (void) const
 Get the SkyBackground::_mfSkyColor field.
Real32getSkyAngle (const UInt32 index)
 Get the value of the index element the SkyBackground::_mfSkyAngle field.
MFReal32getSkyAngle (void)
 Get the SkyBackground::_mfSkyAngle field.
const MFReal32getSkyAngle (void) const
 Get the SkyBackground::_mfSkyAngle field.
Color4fgetGroundColor (const UInt32 index)
 Get the value of the index element the SkyBackground::_mfGroundColor field.
MFColor4fgetGroundColor (void)
 Get the SkyBackground::_mfGroundColor field.
const MFColor4fgetGroundColor (void) const
 Get the SkyBackground::_mfGroundColor field.
Real32getGroundAngle (const UInt32 index)
 Get the value of the index element the SkyBackground::_mfGroundAngle field.
MFReal32getGroundAngle (void)
 Get the SkyBackground::_mfGroundAngle field.
const MFReal32getGroundAngle (void) const
 Get the SkyBackground::_mfGroundAngle field.
Vec3fgetTopTexCoord (const UInt32 index)
 Get the value of the index element the SkyBackground::_mfTopTexCoord field.
MFVec3fgetTopTexCoord (void)
 Get the SkyBackground::_mfTopTexCoord field.
const MFVec3fgetTopTexCoord (void) const
 Get the SkyBackground::_mfTopTexCoord field.
Vec3fgetBottomTexCoord (const UInt32 index)
 Get the value of the index element the SkyBackground::_mfBottomTexCoord field.
MFVec3fgetBottomTexCoord (void)
 Get the SkyBackground::_mfBottomTexCoord field.
const MFVec3fgetBottomTexCoord (void) const
 Get the SkyBackground::_mfBottomTexCoord field.
Vec3fgetRightTexCoord (const UInt32 index)
 Get the value of the index element the SkyBackground::_mfRightTexCoord field.
MFVec3fgetRightTexCoord (void)
 Get the SkyBackground::_mfRightTexCoord field.
const MFVec3fgetRightTexCoord (void) const
 Get the SkyBackground::_mfRightTexCoord field.
Vec3fgetLeftTexCoord (const UInt32 index)
 Get the value of the index element the SkyBackground::_mfLeftTexCoord field.
MFVec3fgetLeftTexCoord (void)
 Get the SkyBackground::_mfLeftTexCoord field.
const MFVec3fgetLeftTexCoord (void) const
 Get the SkyBackground::_mfLeftTexCoord field.
Vec3fgetFrontTexCoord (const UInt32 index)
 Get the value of the index element the SkyBackground::_mfFrontTexCoord field.
MFVec3fgetFrontTexCoord (void)
 Get the SkyBackground::_mfFrontTexCoord field.
const MFVec3fgetFrontTexCoord (void) const
 Get the SkyBackground::_mfFrontTexCoord field.
Vec3fgetBackTexCoord (const UInt32 index)
 Get the value of the index element the SkyBackground::_mfBackTexCoord field.
MFVec3fgetBackTexCoord (void)
 Get the SkyBackground::_mfBackTexCoord field.
const MFVec3fgetBackTexCoord (void) const
 Get the SkyBackground::_mfBackTexCoord field.
Field Set


void setSphereRes (const UInt32 &value)
 Set the value of the SkyBackground::_sfSphereRes field.
void setBackTexture (const TextureChunkPtr &value)
 Set the value of the SkyBackground::_sfBackTexture field.
void setBottomTexture (const TextureChunkPtr &value)
 Set the value of the SkyBackground::_sfBottomTexture field.
void setFrontTexture (const TextureChunkPtr &value)
 Set the value of the SkyBackground::_sfFrontTexture field.
void setLeftTexture (const TextureChunkPtr &value)
 Set the value of the SkyBackground::_sfLeftTexture field.
void setRightTexture (const TextureChunkPtr &value)
 Set the value of the SkyBackground::_sfRightTexture field.
void setTopTexture (const TextureChunkPtr &value)
 Set the value of the SkyBackground::_sfTopTexture field.
void setBoxInside (const bool &value)
 Set the value of the SkyBackground::_sfBoxInside field.
void setBeacon (const NodePtr &value)
 Set the value of the SkyBackground::_sfBeacon field.
void setClearStencilBit (const Int32 &value)
 Set the value of the SkyBackground::_sfClearStencilBit field.
Binary Access
virtual UInt32 getBinSize (const BitVector &whichField)
virtual void copyToBin (BinaryDataHandler &pMem, const BitVector &whichField)
virtual void copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField)
Copy


virtual FieldContainerPtr shallowCopy (void) const
Handle Attachments


void addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
void subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0)
AttachmentPtr findAttachment (UInt32 groupId, UInt16 binding=0)
AttachmentPtr findAttachment (const FieldContainerType &type, UInt16 binding=0)


SFAttachmentMapgetSFAttachments (void)
Get Instance Type Information


UInt32 getTypeId (void) const
UInt16 getGroupId (void) const
const Char8getTypeName (void) const


FieldgetField (UInt32 fieldId)
FieldgetField (const Char8 *fieldName)

Static Public Member Functions

Class Get


static FieldContainerTypegetClassType (void)
 access the type of the class
static UInt32 getClassTypeId (void)
 access the numerical type of the class
Construction


static SkyBackgroundPtr create (void)
 create a new instance of the class
static SkyBackgroundPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype
Class Get


static const Char8getClassname (void)
Get Class Type Information


static UInt16 getClassGroupId (void)

Static Public Attributes

static const osg::BitVector SkyColorFieldMask
static const osg::BitVector SkyAngleFieldMask
static const osg::BitVector GroundColorFieldMask
static const osg::BitVector GroundAngleFieldMask
static const osg::BitVector SphereResFieldMask
static const osg::BitVector BackTextureFieldMask
static const osg::BitVector BottomTextureFieldMask
static const osg::BitVector FrontTextureFieldMask
static const osg::BitVector LeftTextureFieldMask
static const osg::BitVector RightTextureFieldMask
static const osg::BitVector TopTextureFieldMask
static const osg::BitVector BoxInsideFieldMask
static const osg::BitVector TopTexCoordFieldMask
static const osg::BitVector BottomTexCoordFieldMask
static const osg::BitVector RightTexCoordFieldMask
static const osg::BitVector LeftTexCoordFieldMask
static const osg::BitVector FrontTexCoordFieldMask
static const osg::BitVector BackTexCoordFieldMask
static const osg::BitVector BeaconFieldMask
static const osg::BitVector ClearStencilBitFieldMask
static const osg::BitVector MTInfluenceMask
static const BitVector AttachmentsFieldMask
static const BitVector NextFieldMask
CoredNodePtr helper


static const bool isNodeCore = false

Protected Member Functions

Constructors


 SkyBackground (void)
 SkyBackground (const SkyBackground &source)
Destructors


virtual ~SkyBackground (void)
Draw Helper


void drawFace (DrawActionBase *action, TextureChunkPtr tex, StateChunk *&oldtex, const Pnt3f &p1, const Pnt3f &p2, const Pnt3f &p3, const Pnt3f &p4, const Vec3f *texCoord)
Sync


void executeSyncImpl (SkyBackgroundBase *pOther, const BitVector &whichField)
virtual void executeSync (FieldContainer &other, const BitVector &whichField)
Sync


void executeSyncImpl (BackgroundBase *pOther, const BitVector &whichField)
Sync


void executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField)
Sync


void executeSyncImpl (FieldContainer *pOther, const BitVector &whichField)
Pointer


AttachmentContainerPtr getPtr (void)
MT Edit


template<class FieldTypeT>
void beginEditX (const BitVector &whichField, FieldTypeT &field)
template<class FieldTypeT>
void endEditX (const BitVector &whichField, FieldTypeT &field)
MT Construction


void onCreate (const FieldContainer *source=NULL)
void onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL)
MT Destruction


virtual void onDestroy (void)

Static Protected Member Functions

Create Fieldcontainer


template<class ObjectPtrT>
static void newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP)
template<class ObjectPtrT>
static void newPtr (ObjectPtrT &result)

Protected Attributes

Fields


MFColor4f _mfSkyColor
MFReal32 _mfSkyAngle
MFColor4f _mfGroundColor
MFReal32 _mfGroundAngle
SFUInt32 _sfSphereRes
SFTextureChunkPtr _sfBackTexture
SFTextureChunkPtr _sfBottomTexture
SFTextureChunkPtr _sfFrontTexture
SFTextureChunkPtr _sfLeftTexture
SFTextureChunkPtr _sfRightTexture
SFTextureChunkPtr _sfTopTexture
SFBool _sfBoxInside
MFVec3f _mfTopTexCoord
MFVec3f _mfBottomTexCoord
MFVec3f _mfRightTexCoord
MFVec3f _mfLeftTexCoord
MFVec3f _mfFrontTexCoord
MFVec3f _mfBackTexCoord
SFNodePtr _sfBeacon
SFInt32 _sfClearStencilBit
Fields


SFAttachmentMap _attachmentMap
Member


UInt32 _shares

Private Types

typedef SkyBackgroundBase Inherited

Private Member Functions

void operator= (const SkyBackground &source)

Static Private Member Functions

static void initMethod (void)

Private Attributes

std::vector< Real32_cosval
std::vector< Real32_sinval

Friends

class FieldContainer
class SkyBackgroundBase


Detailed Description

A Sky/Ground/Skybox background, inspired by VRML, see Sky Background for a description.

The sky is defined by the _mfSkyAngle and _mfSkyColor fields, the ground by the _mfGroundAngle and _mfGround Color fields. The resolution of the sky sphere can be influenced by the _sfSphereRes field. The sky box is defined by the _sfBackTexture, _sfFrontTexture, _sfLeftTexture, _sfRightTexture, _sfTopTexture and _sfBottomTexture fields.

Definition at line 58 of file OSGSkyBackground.h.


Member Typedef Documentation

Reimplemented from osg::SkyBackgroundBase.

Definition at line 62 of file OSGSkyBackground.h.

Reimplemented from osg::BackgroundBase.

Definition at line 109 of file OSGSkyBackgroundBase.h.


Member Enumeration Documentation

anonymous enum [inherited]

Enumerator:
SkyColorFieldId 
SkyAngleFieldId 
GroundColorFieldId 
GroundAngleFieldId 
SphereResFieldId 
BackTextureFieldId 
BottomTextureFieldId 
FrontTextureFieldId 
LeftTextureFieldId 
RightTextureFieldId 
TopTextureFieldId 
BoxInsideFieldId 
TopTexCoordFieldId 
BottomTexCoordFieldId 
RightTexCoordFieldId 
LeftTexCoordFieldId 
FrontTexCoordFieldId 
BackTexCoordFieldId 
BeaconFieldId 
ClearStencilBitFieldId 
NextFieldId 

Definition at line 111 of file OSGSkyBackgroundBase.h.

00112     {
00113         SkyColorFieldId        = Inherited::NextFieldId,
00114         SkyAngleFieldId        = SkyColorFieldId        + 1,
00115         GroundColorFieldId     = SkyAngleFieldId        + 1,
00116         GroundAngleFieldId     = GroundColorFieldId     + 1,
00117         SphereResFieldId       = GroundAngleFieldId     + 1,
00118         BackTextureFieldId     = SphereResFieldId       + 1,
00119         BottomTextureFieldId   = BackTextureFieldId     + 1,
00120         FrontTextureFieldId    = BottomTextureFieldId   + 1,
00121         LeftTextureFieldId     = FrontTextureFieldId    + 1,
00122         RightTextureFieldId    = LeftTextureFieldId     + 1,
00123         TopTextureFieldId      = RightTextureFieldId    + 1,
00124         BoxInsideFieldId       = TopTextureFieldId      + 1,
00125         TopTexCoordFieldId     = BoxInsideFieldId       + 1,
00126         BottomTexCoordFieldId  = TopTexCoordFieldId     + 1,
00127         RightTexCoordFieldId   = BottomTexCoordFieldId  + 1,
00128         LeftTexCoordFieldId    = RightTexCoordFieldId   + 1,
00129         FrontTexCoordFieldId   = LeftTexCoordFieldId    + 1,
00130         BackTexCoordFieldId    = FrontTexCoordFieldId   + 1,
00131         BeaconFieldId          = BackTexCoordFieldId    + 1,
00132         ClearStencilBitFieldId = BeaconFieldId          + 1,
00133         NextFieldId            = ClearStencilBitFieldId + 1
00134     };

anonymous enum [inherited]

Enumerator:
AttachmentsFieldId 
NextFieldId 

Definition at line 78 of file OSGAttachmentContainerImpl.h.

anonymous enum [inherited]

Enumerator:
NextFieldId 

Definition at line 73 of file OSGFieldContainerImpl.h.

00073 { NextFieldId = 1 };


Constructor & Destructor Documentation

SkyBackground::SkyBackground ( void   )  [protected]

Definition at line 80 of file OSGSkyBackground.cpp.

00080                                  :
00081     Inherited()
00082 {
00083 }

SkyBackground::SkyBackground ( const SkyBackground source  )  [protected]

Definition at line 85 of file OSGSkyBackground.cpp.

00085                                                         :
00086     Inherited(source)
00087 {
00088 }

SkyBackground::~SkyBackground ( void   )  [protected, virtual]

Definition at line 90 of file OSGSkyBackground.cpp.

00091 {
00092 }


Member Function Documentation

void SkyBackground::changed ( BitVector  whichField,
UInt32  origin 
) [virtual]

Reimplemented from osg::Background.

Definition at line 100 of file OSGSkyBackground.cpp.

References osg::Background::changed().

00101 {
00102   Inherited::changed(whichField, origin);
00103 }

void SkyBackground::clear ( DrawActionBase action,
Viewport port 
) [virtual]

Implements osg::Background.

Definition at line 164 of file OSGSkyBackground.cpp.

References _cosval, osg::SkyBackgroundBase::_mfGroundAngle, osg::SkyBackgroundBase::_mfGroundColor, osg::SkyBackgroundBase::_mfSkyAngle, osg::SkyBackgroundBase::_mfSkyColor, osg::SkyBackgroundBase::_sfSphereRes, _sinval, osg::StateChunk::deactivate(), drawFace(), osg::Eps, osg::SkyBackgroundBase::getBackTexCoord(), osg::SkyBackgroundBase::getBackTexture(), osg::SkyBackgroundBase::getBeacon(), osg::SkyBackgroundBase::getBottomTexCoord(), osg::SkyBackgroundBase::getBottomTexture(), osg::DrawActionBase::getCamera(), osg::SkyBackgroundBase::getClearStencilBit(), osg::SkyBackgroundBase::getFrontTexCoord(), osg::SkyBackgroundBase::getFrontTexture(), osg::SkyBackgroundBase::getLeftTexCoord(), osg::SkyBackgroundBase::getLeftTexture(), osg::Viewport::getPixelHeight(), osg::Viewport::getPixelWidth(), osg::Camera::getProjection(), osg::Camera::getProjectionTranslation(), osg::SkyBackgroundBase::getRightTexCoord(), osg::SkyBackgroundBase::getRightTexture(), osg::SkyBackgroundBase::getTopTexCoord(), osg::SkyBackgroundBase::getTopTexture(), osg::SField< FieldTypeT, fieldNameSpace >::getValue(), osg::TransformationMatrix< ValueTypeT >::getValues(), osg::Color4< ValueTypeT >::getValuesRGBA(), osg::Camera::getViewing(), osg::TransformationMatrix< ValueTypeT >::mult(), osg::TransformationMatrix< ValueTypeT >::multLeft(), osg::NullFC, osg::osgabs(), osg::osgcos(), osg::osgsin(), osg::Pi, osg::MField< FieldTypeT, fieldNameSpace >::size(), and tfac.

00165 {
00166 
00167     glPushAttrib(GL_POLYGON_BIT | GL_DEPTH_BUFFER_BIT | 
00168                  GL_LIGHTING_BIT);
00169 
00170     glDisable(GL_LIGHTING);
00171     glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
00172     glDisable(GL_DEPTH_TEST);
00173 
00174     glMatrixMode(GL_MODELVIEW);
00175     glPushMatrix();
00176 
00177     Matrix m,t;
00178     action->getCamera()->getViewing(m, viewport->getPixelWidth(),
00179                                         viewport->getPixelHeight());
00180     action->getCamera()->getProjectionTranslation(t, 
00181                                         viewport->getPixelWidth(),
00182                                         viewport->getPixelHeight());
00183     m.multLeft(t);
00184 
00185     if (getBeacon() != NullFC)
00186     {
00187         getBeacon()->getToWorld(t);
00188         m.mult(t);
00189     }
00190 
00191     m[3][0] = m[3][1] = m[3][2] = 0;
00192     glLoadMatrixf(m.getValues());         
00193 
00194     glMatrixMode(GL_PROJECTION);
00195     glPushMatrix();
00196 
00197     glLoadIdentity();
00198     glTranslatef(0.f, 0.f, 0.5);
00199     glScalef(1.f, 1.f, 0.f);    
00200     
00201     action->getCamera()->getProjection( m, 
00202                                         viewport->getPixelWidth(),
00203                                         viewport->getPixelHeight());
00204     glMultMatrixf(m.getValues());         
00205 
00206     UInt32 i, j;
00207     UInt32 sr = _sfSphereRes.getValue() + 1;      // sphere resolution
00208     
00209     if ( _cosval.size() != sr ) 
00210     {
00211         Real32 da = 2 * Pi / (sr - 1);    
00212 
00213         _cosval.resize(sr);
00214         _sinval.resize(sr);
00215       
00216         for(i = 0; i < sr; ++i)
00217         {
00218             _cosval[i] = osgcos(i * da);
00219             _sinval[i] = osgsin(i * da);     
00220         }
00221     }
00222     
00223     Real32  vcos1,vsin1,vcos2,vsin2;
00224         
00225     if(_mfSkyAngle.size() > 0)
00226     {
00227         vcos1 = osgcos(_mfSkyAngle[0]);
00228         vsin1 = osgsin(_mfSkyAngle[0]);
00229 
00230         glBegin(GL_TRIANGLE_FAN);
00231         glColor4fv((GLfloat*) _mfSkyColor[0].getValuesRGBA());
00232         glVertex3f(0, 1, 0);
00233         glColor4fv((GLfloat*) _mfSkyColor[1].getValuesRGBA());
00234 
00235         for(i = 0; i < sr; ++i)
00236         {
00237             glVertex3f(vsin1 * _sinval[i], vcos1, vsin1 * _cosval[i]);
00238         }
00239 
00240         glEnd();
00241 
00242 
00243         for(j = 0; j < _mfSkyAngle.size() - 1; ++j)
00244         {
00245             Color4f c1, c2;
00246 
00247             c1 = _mfSkyColor[j+1];
00248             c2 = _mfSkyColor[j+2];
00249 
00250             vcos1 = osgcos(_mfSkyAngle[j  ]);
00251             vsin1 = osgsin(_mfSkyAngle[j  ]);
00252             vcos2 = osgcos(_mfSkyAngle[j+1]);
00253             vsin2 = osgsin(_mfSkyAngle[j+1]);
00254 
00255             glBegin(GL_TRIANGLE_STRIP);
00256 
00257             for(i = 0; i < sr; ++i)
00258             {
00259                 glColor4fv((GLfloat*) c1.getValuesRGBA());
00260                 glVertex3f(vsin1 * _sinval[i], vcos1, vsin1 * _cosval[i]);
00261                 glColor4fv((GLfloat*) c2.getValuesRGBA());
00262                 glVertex3f(vsin2 * _sinval[i], vcos2, vsin2 * _cosval[i]);
00263             }
00264             glEnd();
00265         }
00266 
00267         if(osgabs(_mfSkyAngle[j] - Pi) > Eps)
00268         {
00269             glBegin(GL_TRIANGLE_FAN);
00270             glColor4fv((GLfloat*) _mfSkyColor[j+1].getValuesRGBA());
00271             glVertex3f(0, -1, 0);
00272             vcos1 = osgcos(_mfSkyAngle[j]);
00273             vsin1 = osgsin(_mfSkyAngle[j]);
00274 
00275             for(i = 0; i < sr; ++i)
00276             {
00277                 glVertex3f(vsin1 * _sinval[i], vcos1, vsin1 * _cosval[i]);
00278             }
00279 
00280             glEnd();
00281         }
00282     }
00283     else // no angles, just fill single color
00284     {
00285         if(_mfSkyColor.size() > 0)
00286         {
00287             glClearColor(_mfSkyColor[0][0], _mfSkyColor[0][1], 
00288                          _mfSkyColor[0][2], 0);
00289         }
00290         else
00291         {
00292             glClearColor(0, 0, 0, 0);
00293         }
00294         glClear(GL_COLOR_BUFFER_BIT);
00295     }
00296     
00297     // Draw the ground.
00298     // It's possible to be smarter about this, but for now just overdraw.
00299 
00300     if(_mfGroundAngle.size() > 0)
00301     {    
00302         vcos1 = -osgcos(_mfGroundAngle[0]);
00303         vsin1 =  osgsin(_mfGroundAngle[0]);
00304 
00305         glBegin(GL_TRIANGLE_FAN);
00306         
00307         if (_mfGroundColor.size())
00308             glColor4fv((GLfloat*) _mfGroundColor[0].getValuesRGBA());
00309         
00310         glVertex3f(0, -1, 0);
00311         
00312         if (_mfGroundColor.size() > 1)
00313             glColor4fv((GLfloat*) _mfGroundColor[1].getValuesRGBA());
00314 
00315         for(i = 0; i < sr; ++i)
00316         {
00317             glVertex3f(vsin1 * _sinval[i], vcos1, vsin1 * _cosval[i]);
00318         }
00319 
00320         glEnd();
00321 
00322 
00323         for(j = 0; j < _mfGroundAngle.size() - 1; ++j)
00324         {
00325             Color4f c1, c2;
00326 
00327             if (_mfGroundColor.size() > j+2)
00328             {
00329                 c1 = _mfGroundColor[j+1];
00330                 c2 = _mfGroundColor[j+2];
00331             }
00332 
00333             vcos1 = -osgcos(_mfGroundAngle[j  ]);
00334             vsin1 =  osgsin(_mfGroundAngle[j  ]);
00335             vcos2 = -osgcos(_mfGroundAngle[j+1]);
00336             vsin2 =  osgsin(_mfGroundAngle[j+1]);
00337 
00338             glBegin(GL_TRIANGLE_STRIP);
00339 
00340             for(i = 0; i < sr; ++i)
00341             {
00342                 glColor4fv((GLfloat*) c1.getValuesRGBA());
00343                 glVertex3f(vsin1 * _sinval[i], vcos1, vsin1 * _cosval[i]);
00344                 glColor4fv((GLfloat*) c2.getValuesRGBA());
00345                 glVertex3f(vsin2 * _sinval[i], vcos2, vsin2 * _cosval[i]);
00346             }
00347             glEnd();
00348         }
00349     }
00350     
00351     // now draw the textures, if set
00352     StateChunk *tchunk = NULL;
00353     static Vec3f defaulttc[7][4] = {
00354      // 2D default TCs
00355      { Vec3f(0,0,0), Vec3f(1,0,0), Vec3f(1,1,0), Vec3f(0,1,0) },
00356      
00357      // Cubetex Default TCs
00358      { Vec3f(-1, 1,-1), Vec3f( 1, 1,-1), Vec3f( 1,-1,-1), Vec3f(-1,-1,-1) },
00359      { Vec3f( 1, 1, 1), Vec3f(-1, 1, 1), Vec3f(-1,-1, 1), Vec3f( 1,-1, 1) },
00360      { Vec3f( 1, 1,-1), Vec3f(-1, 1,-1), Vec3f(-1, 1, 1), Vec3f( 1, 1, 1) },       
00361      { Vec3f( 1,-1, 1), Vec3f(-1,-1, 1), Vec3f(-1,-1,-1), Vec3f( 1,-1,-1) },
00362      { Vec3f( 1, 1,-1), Vec3f( 1, 1, 1), Vec3f( 1,-1, 1), Vec3f( 1,-1,-1) },        
00363      { Vec3f(-1, 1, 1), Vec3f(-1, 1,-1), Vec3f(-1,-1,-1), Vec3f(-1,-1, 1) },
00364      };
00365     
00366     #undef tfac
00367     #define tfac(t,c)  \
00368         defaulttc[(c)*((t) != NullFC && (t)->getImage() != NullFC && \
00369                   (t)->getImage()->getSideCount() == 6)]
00370      
00371     drawFace(action, getBackTexture(),   tchunk,
00372                                          Pnt3f(0.5, -0.5,  0.5),
00373                                          Pnt3f(-0.5, -0.5,  0.5),
00374                                          Pnt3f(-0.5,  0.5,  0.5),
00375                                          Pnt3f(0.5,  0.5,  0.5),
00376                                          getBackTexCoord().size()?
00377                                          &getBackTexCoord()[0]:
00378                                           tfac(getBackTexture(), 1));
00379     
00380     drawFace(action, getFrontTexture(),  tchunk,
00381                                          Pnt3f(-0.5, -0.5, -0.5),
00382                                          Pnt3f(0.5, -0.5, -0.5),
00383                                          Pnt3f(0.5,  0.5, -0.5),
00384                                          Pnt3f(-0.5,  0.5, -0.5),
00385                                          getFrontTexCoord().size()?
00386                                          &getFrontTexCoord()[0]:
00387                                           tfac(getFrontTexture(), 2));
00388     
00389     drawFace(action, getBottomTexture(), tchunk,
00390                                          Pnt3f(-0.5, -0.5,  0.5),
00391                                          Pnt3f(0.5, -0.5,  0.5),
00392                                          Pnt3f(0.5, -0.5, -0.5),
00393                                          Pnt3f(-0.5, -0.5, -0.5),
00394                                          getBottomTexCoord().size()?
00395                                          &getBottomTexCoord()[0]:
00396                                           tfac(getBottomTexture(), 3));
00397     
00398     drawFace(action, getTopTexture(),    tchunk,
00399                                          Pnt3f(-0.5,  0.5, -0.5),
00400                                          Pnt3f(0.5,  0.5, -0.5),
00401                                          Pnt3f(0.5,  0.5,  0.5),
00402                                          Pnt3f(-0.5,  0.5,  0.5),
00403                                          getTopTexCoord().size()?
00404                                          &getTopTexCoord()[0]:
00405                                           tfac(getTopTexture(), 4));
00406     
00407     drawFace(action, getLeftTexture(),   tchunk,
00408                                          Pnt3f(-0.5, -0.5,  0.5),
00409                                          Pnt3f(-0.5, -0.5, -0.5),
00410                                          Pnt3f(-0.5,  0.5, -0.5),
00411                                          Pnt3f(-0.5,  0.5,  0.5),
00412                                          getLeftTexCoord().size()?
00413                                          &getLeftTexCoord()[0]:
00414                                           tfac(getLeftTexture(), 5));
00415     
00416     drawFace(action, getRightTexture(),  tchunk,
00417                                          Pnt3f(0.5, -0.5, -0.5),
00418                                          Pnt3f(0.5, -0.5,  0.5),
00419                                          Pnt3f(0.5,  0.5,  0.5),
00420                                          Pnt3f(0.5,  0.5, -0.5),
00421                                          getRightTexCoord().size()?
00422                                          &getRightTexCoord()[0]:
00423                                           tfac(getRightTexture(), 6));  
00424     #undef tfac
00425     
00426     if(tchunk != NULL)
00427         tchunk->deactivate(action);
00428     
00429     Int32 bit = getClearStencilBit();
00430     
00431     if (bit >= 0)
00432     {
00433         glClearStencil(bit);
00434         glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
00435     }
00436     else
00437     {
00438         glClear(GL_DEPTH_BUFFER_BIT);
00439     }
00440 
00441     glPopMatrix();
00442     glMatrixMode(GL_MODELVIEW);
00443     glPopMatrix();
00444 
00445     glPopAttrib();
00446 
00447     glColor3f(1.0, 1.0, 1.0);
00448 }

void SkyBackground::dump ( UInt32  uiIndent = 0,
const BitVector  bvFlags = 0 
) const [virtual]

Reimplemented from osg::Background.

Definition at line 105 of file OSGSkyBackground.cpp.

References SLOG.

00107 {
00108     SLOG << "Dump SkyBackground NI" << std::endl;
00109 }

void SkyBackground::drawFace ( DrawActionBase action,
TextureChunkPtr  tex,
StateChunk *&  oldtex,
const Pnt3f p1,
const Pnt3f p2,
const Pnt3f p3,
const Pnt3f p4,
const Vec3f texCoord 
) [protected]

Definition at line 113 of file OSGSkyBackground.cpp.

References osg::AttachmentPtr::getCPtr(), osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues(), and osg::NullFC.

Referenced by clear().

00121 {
00122     
00123     if(tex != NullFC)
00124     {
00125         if(oldtex != NULL)
00126         {
00127             tex->changeFrom(action, oldtex);
00128         }
00129         else
00130         {
00131             tex->activate(action);
00132         }
00133         
00134         if(tex->isTransparent())
00135         {
00136             glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
00137             glEnable(GL_BLEND);
00138         }
00139 
00140         // ENRICO: this part holds the informations about
00141         // custom texture coordinates
00142         // Mess with the best, die like the rest
00143         glBegin(GL_QUADS);
00144         glTexCoord3fv((GLfloat*) texCoord[0].getValues());
00145         glVertex3fv((GLfloat*) p1.getValues());
00146         glTexCoord3fv((GLfloat*) texCoord[1].getValues());
00147         glVertex3fv((GLfloat*) p2.getValues());
00148         glTexCoord3fv((GLfloat*) texCoord[2].getValues());
00149         glVertex3fv((GLfloat*) p3.getValues());
00150         glTexCoord3fv((GLfloat*) texCoord[3].getValues());
00151         glVertex3fv((GLfloat*) p4.getValues());
00152         glEnd();
00153 
00154         if(tex->isTransparent())
00155         {
00156             glDisable(GL_BLEND);
00157         }
00158         
00159         oldtex = tex.getCPtr();
00160     }
00161    
00162 }

void SkyBackground::initMethod ( void   )  [static, private]

Reimplemented from osg::Background.

Definition at line 96 of file OSGSkyBackground.cpp.

00097 {
00098 }

void osg::SkyBackground::operator= ( const SkyBackground source  )  [private]

osg::FieldContainerType & osg::SkyBackgroundBase::getClassType ( void   )  [inline, static, inherited]

Reimplemented from osg::BackgroundBase.

Definition at line 58 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_type.

Referenced by osg::SkyBackgroundBase::create().

00059 {
00060     return _type; 
00061 } 

osg::UInt32 osg::SkyBackgroundBase::getClassTypeId ( void   )  [inline, static, inherited]

Reimplemented from osg::BackgroundBase.

Definition at line 65 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_type, and osg::TypeBase::getId().

00066 {
00067     return _type.getId(); 
00068 } 

FieldContainerType & osg::SkyBackgroundBase::getType ( void   )  [virtual, inherited]

Reimplemented from osg::BackgroundBase.

Definition at line 315 of file OSGSkyBackgroundBase.cpp.

References osg::SkyBackgroundBase::_type.

00316 {
00317     return _type; 
00318 } 

const FieldContainerType & osg::SkyBackgroundBase::getType ( void   )  const [virtual, inherited]

Reimplemented from osg::BackgroundBase.

Definition at line 320 of file OSGSkyBackgroundBase.cpp.

References osg::SkyBackgroundBase::_type.

00321 {
00322     return _type;
00323 } 

UInt32 osg::SkyBackgroundBase::getContainerSize ( void   )  const [virtual, inherited]

Reimplemented from osg::BackgroundBase.

Definition at line 335 of file OSGSkyBackgroundBase.cpp.

00336 { 
00337     return sizeof(SkyBackground); 
00338 }

MFColor4f * osg::SkyBackgroundBase::getMFSkyColor ( void   )  [inline, inherited]

Definition at line 101 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfSkyColor.

00102 {
00103     return &_mfSkyColor;
00104 }

MFReal32 * osg::SkyBackgroundBase::getMFSkyAngle ( void   )  [inline, inherited]

Definition at line 108 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfSkyAngle.

00109 {
00110     return &_mfSkyAngle;
00111 }

MFColor4f * osg::SkyBackgroundBase::getMFGroundColor ( void   )  [inline, inherited]

Definition at line 115 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfGroundColor.

00116 {
00117     return &_mfGroundColor;
00118 }

MFReal32 * osg::SkyBackgroundBase::getMFGroundAngle ( void   )  [inline, inherited]

Definition at line 122 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfGroundAngle.

00123 {
00124     return &_mfGroundAngle;
00125 }

SFUInt32 * osg::SkyBackgroundBase::getSFSphereRes ( void   )  [inline, inherited]

Definition at line 129 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfSphereRes.

00130 {
00131     return &_sfSphereRes;
00132 }

SFTextureChunkPtr * osg::SkyBackgroundBase::getSFBackTexture ( void   )  [inline, inherited]

Definition at line 136 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfBackTexture.

00137 {
00138     return &_sfBackTexture;
00139 }

SFTextureChunkPtr * osg::SkyBackgroundBase::getSFBottomTexture ( void   )  [inline, inherited]

Definition at line 143 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfBottomTexture.

00144 {
00145     return &_sfBottomTexture;
00146 }

SFTextureChunkPtr * osg::SkyBackgroundBase::getSFFrontTexture ( void   )  [inline, inherited]

Definition at line 150 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfFrontTexture.

00151 {
00152     return &_sfFrontTexture;
00153 }

SFTextureChunkPtr * osg::SkyBackgroundBase::getSFLeftTexture ( void   )  [inline, inherited]

Definition at line 157 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfLeftTexture.

00158 {
00159     return &_sfLeftTexture;
00160 }

SFTextureChunkPtr * osg::SkyBackgroundBase::getSFRightTexture ( void   )  [inline, inherited]

Definition at line 164 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfRightTexture.

00165 {
00166     return &_sfRightTexture;
00167 }

SFTextureChunkPtr * osg::SkyBackgroundBase::getSFTopTexture ( void   )  [inline, inherited]

Definition at line 171 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfTopTexture.

00172 {
00173     return &_sfTopTexture;
00174 }

SFBool * osg::SkyBackgroundBase::getSFBoxInside ( void   )  [inline, inherited]

Definition at line 178 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfBoxInside.

00179 {
00180     return &_sfBoxInside;
00181 }

MFVec3f * osg::SkyBackgroundBase::getMFTopTexCoord ( void   )  [inline, inherited]

Definition at line 185 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfTopTexCoord.

00186 {
00187     return &_mfTopTexCoord;
00188 }

MFVec3f * osg::SkyBackgroundBase::getMFBottomTexCoord ( void   )  [inline, inherited]

Definition at line 192 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfBottomTexCoord.

00193 {
00194     return &_mfBottomTexCoord;
00195 }

MFVec3f * osg::SkyBackgroundBase::getMFRightTexCoord ( void   )  [inline, inherited]

Definition at line 199 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfRightTexCoord.

00200 {
00201     return &_mfRightTexCoord;
00202 }

MFVec3f * osg::SkyBackgroundBase::getMFLeftTexCoord ( void   )  [inline, inherited]

Definition at line 206 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfLeftTexCoord.

00207 {
00208     return &_mfLeftTexCoord;
00209 }

MFVec3f * osg::SkyBackgroundBase::getMFFrontTexCoord ( void   )  [inline, inherited]

Definition at line 213 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfFrontTexCoord.

00214 {
00215     return &_mfFrontTexCoord;
00216 }

MFVec3f * osg::SkyBackgroundBase::getMFBackTexCoord ( void   )  [inline, inherited]

Definition at line 220 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfBackTexCoord.

00221 {
00222     return &_mfBackTexCoord;
00223 }

SFNodePtr * osg::SkyBackgroundBase::getSFBeacon ( void   )  [inline, inherited]

Definition at line 227 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfBeacon.

00228 {
00229     return &_sfBeacon;
00230 }

SFInt32 * osg::SkyBackgroundBase::getSFClearStencilBit ( void   )  [inline, inherited]

Definition at line 234 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfClearStencilBit.

00235 {
00236     return &_sfClearStencilBit;
00237 }

UInt32 & osg::SkyBackgroundBase::getSphereRes ( void   )  [inline, inherited]

Definition at line 242 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfSphereRes, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00243 {
00244     return _sfSphereRes.getValue();
00245 }

const UInt32 & osg::SkyBackgroundBase::getSphereRes ( void   )  const [inline, inherited]

Definition at line 249 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfSphereRes, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00250 {
00251     return _sfSphereRes.getValue();
00252 }

TextureChunkPtr & osg::SkyBackgroundBase::getBackTexture ( void   )  [inline, inherited]

Definition at line 263 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfBackTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by clear().

00264 {
00265     return _sfBackTexture.getValue();
00266 }

const TextureChunkPtr & osg::SkyBackgroundBase::getBackTexture ( void   )  const [inline, inherited]

Definition at line 270 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfBackTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00271 {
00272     return _sfBackTexture.getValue();
00273 }

TextureChunkPtr & osg::SkyBackgroundBase::getBottomTexture ( void   )  [inline, inherited]

Definition at line 284 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfBottomTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by clear().

00285 {
00286     return _sfBottomTexture.getValue();
00287 }

const TextureChunkPtr & osg::SkyBackgroundBase::getBottomTexture ( void   )  const [inline, inherited]

Definition at line 291 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfBottomTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00292 {
00293     return _sfBottomTexture.getValue();
00294 }

TextureChunkPtr & osg::SkyBackgroundBase::getFrontTexture ( void   )  [inline, inherited]

Definition at line 305 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfFrontTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by clear().

00306 {
00307     return _sfFrontTexture.getValue();
00308 }

const TextureChunkPtr & osg::SkyBackgroundBase::getFrontTexture ( void   )  const [inline, inherited]

Definition at line 312 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfFrontTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00313 {
00314     return _sfFrontTexture.getValue();
00315 }

TextureChunkPtr & osg::SkyBackgroundBase::getLeftTexture ( void   )  [inline, inherited]

Definition at line 326 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfLeftTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by clear().

00327 {
00328     return _sfLeftTexture.getValue();
00329 }

const TextureChunkPtr & osg::SkyBackgroundBase::getLeftTexture ( void   )  const [inline, inherited]

Definition at line 333 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfLeftTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00334 {
00335     return _sfLeftTexture.getValue();
00336 }

TextureChunkPtr & osg::SkyBackgroundBase::getRightTexture ( void   )  [inline, inherited]

Definition at line 347 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfRightTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by clear().

00348 {
00349     return _sfRightTexture.getValue();
00350 }

const TextureChunkPtr & osg::SkyBackgroundBase::getRightTexture ( void   )  const [inline, inherited]

Definition at line 354 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfRightTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00355 {
00356     return _sfRightTexture.getValue();
00357 }

TextureChunkPtr & osg::SkyBackgroundBase::getTopTexture ( void   )  [inline, inherited]

Definition at line 368 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfTopTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by clear().

00369 {
00370     return _sfTopTexture.getValue();
00371 }

const TextureChunkPtr & osg::SkyBackgroundBase::getTopTexture ( void   )  const [inline, inherited]

Definition at line 375 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfTopTexture, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00376 {
00377     return _sfTopTexture.getValue();
00378 }

bool & osg::SkyBackgroundBase::getBoxInside ( void   )  [inline, inherited]

Definition at line 389 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfBoxInside, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00390 {
00391     return _sfBoxInside.getValue();
00392 }

const bool & osg::SkyBackgroundBase::getBoxInside ( void   )  const [inline, inherited]

Definition at line 396 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfBoxInside, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00397 {
00398     return _sfBoxInside.getValue();
00399 }

NodePtr & osg::SkyBackgroundBase::getBeacon ( void   )  [inline, inherited]

Definition at line 410 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfBeacon, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by clear().

00411 {
00412     return _sfBeacon.getValue();
00413 }

const NodePtr & osg::SkyBackgroundBase::getBeacon ( void   )  const [inline, inherited]

Definition at line 417 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfBeacon, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00418 {
00419     return _sfBeacon.getValue();
00420 }

Int32 & osg::SkyBackgroundBase::getClearStencilBit ( void   )  [inline, inherited]

Definition at line 431 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfClearStencilBit, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by clear().

00432 {
00433     return _sfClearStencilBit.getValue();
00434 }

const Int32 & osg::SkyBackgroundBase::getClearStencilBit ( void   )  const [inline, inherited]

Color4f & osg::SkyBackgroundBase::getSkyColor ( const UInt32  index  )  [inline, inherited]

Definition at line 453 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfSkyColor.

00454 {
00455     return _mfSkyColor[index];
00456 }

MFColor4f & osg::SkyBackgroundBase::getSkyColor ( void   )  [inline, inherited]

Definition at line 460 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfSkyColor.

00461 {
00462     return _mfSkyColor;
00463 }

const MFColor4f & osg::SkyBackgroundBase::getSkyColor ( void   )  const [inline, inherited]

Definition at line 467 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfSkyColor.

00468 {
00469     return _mfSkyColor;
00470 }

Real32 & osg::SkyBackgroundBase::getSkyAngle ( const UInt32  index  )  [inline, inherited]

Definition at line 474 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfSkyAngle.

00475 {
00476     return _mfSkyAngle[index];
00477 }

MFReal32 & osg::SkyBackgroundBase::getSkyAngle ( void   )  [inline, inherited]

Definition at line 481 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfSkyAngle.

00482 {
00483     return _mfSkyAngle;
00484 }

const MFReal32 & osg::SkyBackgroundBase::getSkyAngle ( void   )  const [inline, inherited]

Definition at line 488 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfSkyAngle.

00489 {
00490     return _mfSkyAngle;
00491 }

Color4f & osg::SkyBackgroundBase::getGroundColor ( const UInt32  index  )  [inline, inherited]

Definition at line 495 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfGroundColor.

00496 {
00497     return _mfGroundColor[index];
00498 }

MFColor4f & osg::SkyBackgroundBase::getGroundColor ( void   )  [inline, inherited]

Definition at line 502 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfGroundColor.

00503 {
00504     return _mfGroundColor;
00505 }

const MFColor4f & osg::SkyBackgroundBase::getGroundColor ( void   )  const [inline, inherited]

Definition at line 509 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfGroundColor.

00510 {
00511     return _mfGroundColor;
00512 }

Real32 & osg::SkyBackgroundBase::getGroundAngle ( const UInt32  index  )  [inline, inherited]

Definition at line 516 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfGroundAngle.

00517 {
00518     return _mfGroundAngle[index];
00519 }

MFReal32 & osg::SkyBackgroundBase::getGroundAngle ( void   )  [inline, inherited]

Definition at line 523 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfGroundAngle.

00524 {
00525     return _mfGroundAngle;
00526 }

const MFReal32 & osg::SkyBackgroundBase::getGroundAngle ( void   )  const [inline, inherited]

Definition at line 530 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfGroundAngle.

00531 {
00532     return _mfGroundAngle;
00533 }

Vec3f & osg::SkyBackgroundBase::getTopTexCoord ( const UInt32  index  )  [inline, inherited]

Definition at line 537 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfTopTexCoord.

00538 {
00539     return _mfTopTexCoord[index];
00540 }

MFVec3f & osg::SkyBackgroundBase::getTopTexCoord ( void   )  [inline, inherited]

Definition at line 544 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfTopTexCoord.

Referenced by clear().

00545 {
00546     return _mfTopTexCoord;
00547 }

const MFVec3f & osg::SkyBackgroundBase::getTopTexCoord ( void   )  const [inline, inherited]

Definition at line 551 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfTopTexCoord.

00552 {
00553     return _mfTopTexCoord;
00554 }

Vec3f & osg::SkyBackgroundBase::getBottomTexCoord ( const UInt32  index  )  [inline, inherited]

Definition at line 558 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfBottomTexCoord.

00559 {
00560     return _mfBottomTexCoord[index];
00561 }

MFVec3f & osg::SkyBackgroundBase::getBottomTexCoord ( void   )  [inline, inherited]

Definition at line 565 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfBottomTexCoord.

Referenced by clear().

00566 {
00567     return _mfBottomTexCoord;
00568 }

const MFVec3f & osg::SkyBackgroundBase::getBottomTexCoord ( void   )  const [inline, inherited]

Definition at line 572 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfBottomTexCoord.

00573 {
00574     return _mfBottomTexCoord;
00575 }

Vec3f & osg::SkyBackgroundBase::getRightTexCoord ( const UInt32  index  )  [inline, inherited]

Definition at line 579 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfRightTexCoord.

00580 {
00581     return _mfRightTexCoord[index];
00582 }

MFVec3f & osg::SkyBackgroundBase::getRightTexCoord ( void   )  [inline, inherited]

Definition at line 586 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfRightTexCoord.

Referenced by clear().

00587 {
00588     return _mfRightTexCoord;
00589 }

const MFVec3f & osg::SkyBackgroundBase::getRightTexCoord ( void   )  const [inline, inherited]

Definition at line 593 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfRightTexCoord.

00594 {
00595     return _mfRightTexCoord;
00596 }

Vec3f & osg::SkyBackgroundBase::getLeftTexCoord ( const UInt32  index  )  [inline, inherited]

Definition at line 600 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfLeftTexCoord.

00601 {
00602     return _mfLeftTexCoord[index];
00603 }

MFVec3f & osg::SkyBackgroundBase::getLeftTexCoord ( void   )  [inline, inherited]

Definition at line 607 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfLeftTexCoord.

Referenced by clear().

00608 {
00609     return _mfLeftTexCoord;
00610 }

const MFVec3f & osg::SkyBackgroundBase::getLeftTexCoord ( void   )  const [inline, inherited]

Definition at line 614 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfLeftTexCoord.

00615 {
00616     return _mfLeftTexCoord;
00617 }

Vec3f & osg::SkyBackgroundBase::getFrontTexCoord ( const UInt32  index  )  [inline, inherited]

Definition at line 621 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfFrontTexCoord.

00622 {
00623     return _mfFrontTexCoord[index];
00624 }

MFVec3f & osg::SkyBackgroundBase::getFrontTexCoord ( void   )  [inline, inherited]

Definition at line 628 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfFrontTexCoord.

Referenced by clear().

00629 {
00630     return _mfFrontTexCoord;
00631 }

const MFVec3f & osg::SkyBackgroundBase::getFrontTexCoord ( void   )  const [inline, inherited]

Definition at line 635 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfFrontTexCoord.

00636 {
00637     return _mfFrontTexCoord;
00638 }

Vec3f & osg::SkyBackgroundBase::getBackTexCoord ( const UInt32  index  )  [inline, inherited]

Definition at line 642 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfBackTexCoord.

00643 {
00644     return _mfBackTexCoord[index];
00645 }

MFVec3f & osg::SkyBackgroundBase::getBackTexCoord ( void   )  [inline, inherited]

Definition at line 649 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfBackTexCoord.

Referenced by clear().

00650 {
00651     return _mfBackTexCoord;
00652 }

const MFVec3f & osg::SkyBackgroundBase::getBackTexCoord ( void   )  const [inline, inherited]

Definition at line 656 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_mfBackTexCoord.

00657 {
00658     return _mfBackTexCoord;
00659 }

void osg::SkyBackgroundBase::setSphereRes ( const UInt32 value  )  [inline, inherited]

void osg::SkyBackgroundBase::setBackTexture ( const TextureChunkPtr value  )  [inline, inherited]

void osg::SkyBackgroundBase::setBottomTexture ( const TextureChunkPtr value  )  [inline, inherited]

void osg::SkyBackgroundBase::setFrontTexture ( const TextureChunkPtr value  )  [inline, inherited]

void osg::SkyBackgroundBase::setLeftTexture ( const TextureChunkPtr value  )  [inline, inherited]

void osg::SkyBackgroundBase::setRightTexture ( const TextureChunkPtr value  )  [inline, inherited]

void osg::SkyBackgroundBase::setTopTexture ( const TextureChunkPtr value  )  [inline, inherited]

void osg::SkyBackgroundBase::setBoxInside ( const bool &  value  )  [inline, inherited]

void osg::SkyBackgroundBase::setBeacon ( const NodePtr value  )  [inline, inherited]

Definition at line 424 of file OSGSkyBackgroundBase.inl.

References osg::SkyBackgroundBase::_sfBeacon, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00425 {
00426     _sfBeacon.setValue(value);
00427 }

void osg::SkyBackgroundBase::setClearStencilBit ( const Int32 value  )  [inline, inherited]

UInt32 osg::SkyBackgroundBase::getBinSize ( const BitVector whichField  )  [virtual, inherited]

Reimplemented from osg::BackgroundBase.

Definition at line 445 of file OSGSkyBackgroundBase.cpp.

References osg::SkyBackgroundBase::_mfBackTexCoord, osg::SkyBackgroundBase::_mfBottomTexCoord, osg::SkyBackgroundBase::_mfFrontTexCoord, osg::SkyBackgroundBase::_mfGroundAngle, osg::SkyBackgroundBase::_mfGroundColor, osg::SkyBackgroundBase::_mfLeftTexCoord, osg::SkyBackgroundBase::_mfRightTexCoord, osg::SkyBackgroundBase::_mfSkyAngle, osg::SkyBackgroundBase::_mfSkyColor, osg::SkyBackgroundBase::_mfTopTexCoord, osg::SkyBackgroundBase::_sfBackTexture, osg::SkyBackgroundBase::_sfBeacon, osg::SkyBackgroundBase::_sfBottomTexture, osg::SkyBackgroundBase::_sfBoxInside, osg::SkyBackgroundBase::_sfClearStencilBit, osg::SkyBackgroundBase::_sfFrontTexture, osg::SkyBackgroundBase::_sfLeftTexture, osg::SkyBackgroundBase::_sfRightTexture, osg::SkyBackgroundBase::_sfSphereRes, osg::SkyBackgroundBase::_sfTopTexture, osg::SkyBackgroundBase::BackTexCoordFieldMask, osg::SkyBackgroundBase::BackTextureFieldMask, osg::SkyBackgroundBase::BeaconFieldMask, osg::SkyBackgroundBase::BottomTexCoordFieldMask, osg::SkyBackgroundBase::BottomTextureFieldMask, osg::SkyBackgroundBase::BoxInsideFieldMask, osg::SkyBackgroundBase::ClearStencilBitFieldMask, osg::SkyBackgroundBase::FrontTexCoordFieldMask, osg::SkyBackgroundBase::FrontTextureFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::MField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::BackgroundBase::getBinSize(), osg::SkyBackgroundBase::GroundAngleFieldMask, osg::SkyBackgroundBase::GroundColorFieldMask, osg::SkyBackgroundBase::LeftTexCoordFieldMask, osg::SkyBackgroundBase::LeftTextureFieldMask, osg::FieldBits::NoField, osg::SkyBackgroundBase::RightTexCoordFieldMask, osg::SkyBackgroundBase::RightTextureFieldMask, osg::SkyBackgroundBase::SkyAngleFieldMask, osg::SkyBackgroundBase::SkyColorFieldMask, osg::SkyBackgroundBase::SphereResFieldMask, osg::SkyBackgroundBase::TopTexCoordFieldMask, and osg::SkyBackgroundBase::TopTextureFieldMask.

00446 {
00447     UInt32 returnValue = Inherited::getBinSize(whichField);
00448 
00449     if(FieldBits::NoField != (SkyColorFieldMask & whichField))
00450     {
00451         returnValue += _mfSkyColor.getBinSize();
00452     }
00453 
00454     if(FieldBits::NoField != (SkyAngleFieldMask & whichField))
00455     {
00456         returnValue += _mfSkyAngle.getBinSize();
00457     }
00458 
00459     if(FieldBits::NoField != (GroundColorFieldMask & whichField))
00460     {
00461         returnValue += _mfGroundColor.getBinSize();
00462     }
00463 
00464     if(FieldBits::NoField != (GroundAngleFieldMask & whichField))
00465     {
00466         returnValue += _mfGroundAngle.getBinSize();
00467     }
00468 
00469     if(FieldBits::NoField != (SphereResFieldMask & whichField))
00470     {
00471         returnValue += _sfSphereRes.getBinSize();
00472     }
00473 
00474     if(FieldBits::NoField != (BackTextureFieldMask & whichField))
00475     {
00476         returnValue += _sfBackTexture.getBinSize();
00477     }
00478 
00479     if(FieldBits::NoField != (BottomTextureFieldMask & whichField))
00480     {
00481         returnValue += _sfBottomTexture.getBinSize();
00482     }
00483 
00484     if(FieldBits::NoField != (FrontTextureFieldMask & whichField))
00485     {
00486         returnValue += _sfFrontTexture.getBinSize();
00487     }
00488 
00489     if(FieldBits::NoField != (LeftTextureFieldMask & whichField))
00490     {
00491         returnValue += _sfLeftTexture.getBinSize();
00492     }
00493 
00494     if(FieldBits::NoField != (RightTextureFieldMask & whichField))
00495     {
00496         returnValue += _sfRightTexture.getBinSize();
00497     }
00498 
00499     if(FieldBits::NoField != (TopTextureFieldMask & whichField))
00500     {
00501         returnValue += _sfTopTexture.getBinSize();
00502     }
00503 
00504     if(FieldBits::NoField != (BoxInsideFieldMask & whichField))
00505     {
00506         returnValue += _sfBoxInside.getBinSize();
00507     }
00508 
00509     if(FieldBits::NoField != (TopTexCoordFieldMask & whichField))
00510     {
00511         returnValue += _mfTopTexCoord.getBinSize();
00512     }
00513 
00514     if(FieldBits::NoField != (BottomTexCoordFieldMask & whichField))
00515     {
00516         returnValue += _mfBottomTexCoord.getBinSize();
00517     }
00518 
00519     if(FieldBits::NoField != (RightTexCoordFieldMask & whichField))
00520     {
00521         returnValue += _mfRightTexCoord.getBinSize();
00522     }
00523 
00524     if(FieldBits::NoField != (LeftTexCoordFieldMask & whichField))
00525     {
00526         returnValue += _mfLeftTexCoord.getBinSize();
00527     }
00528 
00529     if(FieldBits::NoField != (FrontTexCoordFieldMask & whichField))
00530     {
00531         returnValue += _mfFrontTexCoord.getBinSize();
00532     }
00533 
00534     if(FieldBits::NoField != (BackTexCoordFieldMask & whichField))
00535     {
00536         returnValue += _mfBackTexCoord.getBinSize();
00537     }
00538 
00539     if(FieldBits::NoField != (BeaconFieldMask & whichField))
00540     {
00541         returnValue += _sfBeacon.getBinSize();
00542     }
00543 
00544     if(FieldBits::NoField != (ClearStencilBitFieldMask & whichField))
00545     {
00546         returnValue += _sfClearStencilBit.getBinSize();
00547     }
00548 
00549 
00550     return returnValue;
00551 }

void osg::SkyBackgroundBase::copyToBin ( BinaryDataHandler pMem,
const BitVector whichField 
) [virtual, inherited]

Reimplemented from osg::BackgroundBase.

Definition at line 553 of file OSGSkyBackgroundBase.cpp.

References osg::SkyBackgroundBase::_mfBackTexCoord, osg::SkyBackgroundBase::_mfBottomTexCoord, osg::SkyBackgroundBase::_mfFrontTexCoord, osg::SkyBackgroundBase::_mfGroundAngle, osg::SkyBackgroundBase::_mfGroundColor, osg::SkyBackgroundBase::_mfLeftTexCoord, osg::SkyBackgroundBase::_mfRightTexCoord, osg::SkyBackgroundBase::_mfSkyAngle, osg::SkyBackgroundBase::_mfSkyColor, osg::SkyBackgroundBase::_mfTopTexCoord, osg::SkyBackgroundBase::_sfBackTexture, osg::SkyBackgroundBase::_sfBeacon, osg::SkyBackgroundBase::_sfBottomTexture, osg::SkyBackgroundBase::_sfBoxInside, osg::SkyBackgroundBase::_sfClearStencilBit, osg::SkyBackgroundBase::_sfFrontTexture, osg::SkyBackgroundBase::_sfLeftTexture, osg::SkyBackgroundBase::_sfRightTexture, osg::SkyBackgroundBase::_sfSphereRes, osg::SkyBackgroundBase::_sfTopTexture, osg::SkyBackgroundBase::BackTexCoordFieldMask, osg::SkyBackgroundBase::BackTextureFieldMask, osg::SkyBackgroundBase::BeaconFieldMask, osg::SkyBackgroundBase::BottomTexCoordFieldMask, osg::SkyBackgroundBase::BottomTextureFieldMask, osg::SkyBackgroundBase::BoxInsideFieldMask, osg::SkyBackgroundBase::ClearStencilBitFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::MField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::BackgroundBase::copyToBin(), osg::SkyBackgroundBase::FrontTexCoordFieldMask, osg::SkyBackgroundBase::FrontTextureFieldMask, osg::SkyBackgroundBase::GroundAngleFieldMask, osg::SkyBackgroundBase::GroundColorFieldMask, osg::SkyBackgroundBase::LeftTexCoordFieldMask, osg::SkyBackgroundBase::LeftTextureFieldMask, osg::FieldBits::NoField, osg::SkyBackgroundBase::RightTexCoordFieldMask, osg::SkyBackgroundBase::RightTextureFieldMask, osg::SkyBackgroundBase::SkyAngleFieldMask, osg::SkyBackgroundBase::SkyColorFieldMask, osg::SkyBackgroundBase::SphereResFieldMask, osg::SkyBackgroundBase::TopTexCoordFieldMask, and osg::SkyBackgroundBase::TopTextureFieldMask.

00555 {
00556     Inherited::copyToBin(pMem, whichField);
00557 
00558     if(FieldBits::NoField != (SkyColorFieldMask & whichField))
00559     {
00560         _mfSkyColor.copyToBin(pMem);
00561     }
00562 
00563     if(FieldBits::NoField != (SkyAngleFieldMask & whichField))
00564     {
00565         _mfSkyAngle.copyToBin(pMem);
00566     }
00567 
00568     if(FieldBits::NoField != (GroundColorFieldMask & whichField))
00569     {
00570         _mfGroundColor.copyToBin(pMem);
00571     }
00572 
00573     if(FieldBits::NoField != (GroundAngleFieldMask & whichField))
00574     {
00575         _mfGroundAngle.copyToBin(pMem);
00576     }
00577 
00578     if(FieldBits::NoField != (SphereResFieldMask & whichField))
00579     {
00580         _sfSphereRes.copyToBin(pMem);
00581     }
00582 
00583     if(FieldBits::NoField != (BackTextureFieldMask & whichField))
00584     {
00585         _sfBackTexture.copyToBin(pMem);
00586     }
00587 
00588     if(FieldBits::NoField != (BottomTextureFieldMask & whichField))
00589     {
00590         _sfBottomTexture.copyToBin(pMem);
00591     }
00592 
00593     if(FieldBits::NoField != (FrontTextureFieldMask & whichField))
00594     {
00595         _sfFrontTexture.copyToBin(pMem);
00596     }
00597 
00598     if(FieldBits::NoField != (LeftTextureFieldMask & whichField))
00599     {
00600         _sfLeftTexture.copyToBin(pMem);
00601     }
00602 
00603     if(FieldBits::NoField != (RightTextureFieldMask & whichField))
00604     {
00605         _sfRightTexture.copyToBin(pMem);
00606     }
00607 
00608     if(FieldBits::NoField != (TopTextureFieldMask & whichField))
00609     {
00610         _sfTopTexture.copyToBin(pMem);
00611     }
00612 
00613     if(FieldBits::NoField != (BoxInsideFieldMask & whichField))
00614     {
00615         _sfBoxInside.copyToBin(pMem);
00616     }
00617 
00618     if(FieldBits::NoField != (TopTexCoordFieldMask & whichField))
00619     {
00620         _mfTopTexCoord.copyToBin(pMem);
00621     }
00622 
00623     if(FieldBits::NoField != (BottomTexCoordFieldMask & whichField))
00624     {
00625         _mfBottomTexCoord.copyToBin(pMem);
00626     }
00627 
00628     if(FieldBits::NoField != (RightTexCoordFieldMask & whichField))
00629     {
00630         _mfRightTexCoord.copyToBin(pMem);
00631     }
00632 
00633     if(FieldBits::NoField != (LeftTexCoordFieldMask & whichField))
00634     {
00635         _mfLeftTexCoord.copyToBin(pMem);
00636     }
00637 
00638     if(FieldBits::NoField != (FrontTexCoordFieldMask & whichField))
00639     {
00640         _mfFrontTexCoord.copyToBin(pMem);
00641     }
00642 
00643     if(FieldBits::NoField != (BackTexCoordFieldMask & whichField))
00644     {
00645         _mfBackTexCoord.copyToBin(pMem);
00646     }
00647 
00648     if(FieldBits::NoField != (BeaconFieldMask & whichField))
00649     {
00650         _sfBeacon.copyToBin(pMem);
00651     }
00652 
00653     if(FieldBits::NoField != (ClearStencilBitFieldMask & whichField))
00654     {
00655         _sfClearStencilBit.copyToBin(pMem);
00656     }
00657 
00658 
00659 }

void osg::SkyBackgroundBase::copyFromBin ( BinaryDataHandler pMem,
const BitVector whichField 
) [virtual, inherited]

Reimplemented from osg::BackgroundBase.

Definition at line 661 of file OSGSkyBackgroundBase.cpp.

References osg::SkyBackgroundBase::_mfBackTexCoord, osg::SkyBackgroundBase::_mfBottomTexCoord, osg::SkyBackgroundBase::_mfFrontTexCoord, osg::SkyBackgroundBase::_mfGroundAngle, osg::SkyBackgroundBase::_mfGroundColor, osg::SkyBackgroundBase::_mfLeftTexCoord, osg::SkyBackgroundBase::_mfRightTexCoord, osg::SkyBackgroundBase::_mfSkyAngle, osg::SkyBackgroundBase::_mfSkyColor, osg::SkyBackgroundBase::_mfTopTexCoord, osg::SkyBackgroundBase::_sfBackTexture, osg::SkyBackgroundBase::_sfBeacon, osg::SkyBackgroundBase::_sfBottomTexture, osg::SkyBackgroundBase::_sfBoxInside, osg::SkyBackgroundBase::_sfClearStencilBit, osg::SkyBackgroundBase::_sfFrontTexture, osg::SkyBackgroundBase::_sfLeftTexture, osg::SkyBackgroundBase::_sfRightTexture, osg::SkyBackgroundBase::_sfSphereRes, osg::SkyBackgroundBase::_sfTopTexture, osg::SkyBackgroundBase::BackTexCoordFieldMask, osg::SkyBackgroundBase::BackTextureFieldMask, osg::SkyBackgroundBase::BeaconFieldMask, osg::SkyBackgroundBase::BottomTexCoordFieldMask, osg::SkyBackgroundBase::BottomTextureFieldMask, osg::SkyBackgroundBase::BoxInsideFieldMask, osg::SkyBackgroundBase::ClearStencilBitFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::MField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::BackgroundBase::copyFromBin(), osg::SkyBackgroundBase::FrontTexCoordFieldMask, osg::SkyBackgroundBase::FrontTextureFieldMask, osg::SkyBackgroundBase::GroundAngleFieldMask, osg::SkyBackgroundBase::GroundColorFieldMask, osg::SkyBackgroundBase::LeftTexCoordFieldMask, osg::SkyBackgroundBase::LeftTextureFieldMask, osg::FieldBits::NoField, osg::SkyBackgroundBase::RightTexCoordFieldMask, osg::SkyBackgroundBase::RightTextureFieldMask, osg::SkyBackgroundBase::SkyAngleFieldMask, osg::SkyBackgroundBase::SkyColorFieldMask, osg::SkyBackgroundBase::SphereResFieldMask, osg::SkyBackgroundBase::TopTexCoordFieldMask, and osg::SkyBackgroundBase::TopTextureFieldMask.

00663 {
00664     Inherited::copyFromBin(pMem, whichField);
00665 
00666     if(FieldBits::NoField != (SkyColorFieldMask & whichField))
00667     {
00668         _mfSkyColor.copyFromBin(pMem);
00669     }
00670 
00671     if(FieldBits::NoField != (SkyAngleFieldMask & whichField))
00672     {
00673         _mfSkyAngle.copyFromBin(pMem);
00674     }
00675 
00676     if(FieldBits::NoField != (GroundColorFieldMask & whichField))
00677     {
00678         _mfGroundColor.copyFromBin(pMem);
00679     }
00680 
00681     if(FieldBits::NoField != (GroundAngleFieldMask & whichField))
00682     {
00683         _mfGroundAngle.copyFromBin(pMem);
00684     }
00685 
00686     if(FieldBits::NoField != (SphereResFieldMask & whichField))
00687     {
00688         _sfSphereRes.copyFromBin(pMem);
00689     }
00690 
00691     if(FieldBits::NoField != (BackTextureFieldMask & whichField))
00692     {
00693         _sfBackTexture.copyFromBin(pMem);
00694     }
00695 
00696     if(FieldBits::NoField != (BottomTextureFieldMask & whichField))
00697     {
00698         _sfBottomTexture.copyFromBin(pMem);
00699     }
00700 
00701     if(FieldBits::NoField != (FrontTextureFieldMask & whichField))
00702     {
00703         _sfFrontTexture.copyFromBin(pMem);
00704     }
00705 
00706     if(FieldBits::NoField != (LeftTextureFieldMask & whichField))
00707     {
00708         _sfLeftTexture.copyFromBin(pMem);
00709     }
00710 
00711     if(FieldBits::NoField != (RightTextureFieldMask & whichField))
00712     {
00713         _sfRightTexture.copyFromBin(pMem);
00714     }
00715 
00716     if(FieldBits::NoField != (TopTextureFieldMask & whichField))
00717     {
00718         _sfTopTexture.copyFromBin(pMem);
00719     }
00720 
00721     if(FieldBits::NoField != (BoxInsideFieldMask & whichField))
00722     {
00723         _sfBoxInside.copyFromBin(pMem);
00724     }
00725 
00726     if(FieldBits::NoField != (TopTexCoordFieldMask & whichField))
00727     {
00728         _mfTopTexCoord.copyFromBin(pMem);
00729     }
00730 
00731     if(FieldBits::NoField != (BottomTexCoordFieldMask & whichField))
00732     {
00733         _mfBottomTexCoord.copyFromBin(pMem);
00734     }
00735 
00736     if(FieldBits::NoField != (RightTexCoordFieldMask & whichField))
00737     {
00738         _mfRightTexCoord.copyFromBin(pMem);
00739     }
00740 
00741     if(FieldBits::NoField != (LeftTexCoordFieldMask & whichField))
00742     {
00743         _mfLeftTexCoord.copyFromBin(pMem);
00744     }
00745 
00746     if(FieldBits::NoField != (FrontTexCoordFieldMask & whichField))
00747     {
00748         _mfFrontTexCoord.copyFromBin(pMem);
00749     }
00750 
00751     if(FieldBits::NoField != (BackTexCoordFieldMask & whichField))
00752     {
00753         _mfBackTexCoord.copyFromBin(pMem);
00754     }
00755 
00756     if(FieldBits::NoField != (BeaconFieldMask & whichField))
00757     {
00758         _sfBeacon.copyFromBin(pMem);
00759     }
00760 
00761     if(FieldBits::NoField != (ClearStencilBitFieldMask & whichField))
00762     {
00763         _sfClearStencilBit.copyFromBin(pMem);
00764     }
00765 
00766 
00767 }

SkyBackgroundPtr osg::SkyBackgroundBase::create ( void   )  [inline, static, inherited]

Definition at line 72 of file OSGSkyBackgroundBase.inl.

References osg::AttachmentContainerPtr::dcast(), osg::SkyBackgroundBase::getClassType(), osg::NullFC, and osg::SkyBackgroundBase::shallowCopy().

00073 {
00074     SkyBackgroundPtr fc; 
00075 
00076     if(getClassType().getPrototype() != OSG::NullFC) 
00077     {
00078         fc = SkyBackgroundPtr::dcast(
00079             getClassType().getPrototype()-> shallowCopy()); 
00080     }
00081     
00082     return fc; 
00083 }

SkyBackgroundPtr osg::SkyBackgroundBase::createEmpty ( void   )  [inline, static, inherited]

Definition at line 87 of file OSGSkyBackgroundBase.inl.

References osg::FieldContainer::newPtr().

00088 { 
00089     SkyBackgroundPtr returnValue; 
00090     
00091     newPtr(returnValue); 
00092 
00093     return returnValue; 
00094 }

FieldContainerPtr osg::SkyBackgroundBase::shallowCopy ( void   )  const [virtual, inherited]

Implements osg::FieldContainer.

Definition at line 326 of file OSGSkyBackgroundBase.cpp.

References osg::FieldContainer::newPtr().

Referenced by osg::SkyBackgroundBase::create().

00327 { 
00328     SkyBackgroundPtr returnValue; 
00329 
00330     newPtr(returnValue, dynamic_cast<const SkyBackground *>(this)); 
00331 
00332     return returnValue; 
00333 }

void osg::SkyBackgroundBase::executeSyncImpl ( SkyBackgroundBase pOther,
const BitVector whichField 
) [protected, inherited]

Definition at line 770 of file OSGSkyBackgroundBase.cpp.

References osg::SkyBackgroundBase::_mfBackTexCoord, osg::SkyBackgroundBase::_mfBottomTexCoord, osg::SkyBackgroundBase::_mfFrontTexCoord, osg::SkyBackgroundBase::_mfGroundAngle, osg::SkyBackgroundBase::_mfGroundColor, osg::SkyBackgroundBase::_mfLeftTexCoord, osg::SkyBackgroundBase::_mfRightTexCoord, osg::SkyBackgroundBase::_mfSkyAngle, osg::SkyBackgroundBase::_mfSkyColor, osg::SkyBackgroundBase::_mfTopTexCoord, osg::SkyBackgroundBase::_sfBackTexture, osg::SkyBackgroundBase::_sfBeacon, osg::SkyBackgroundBase::_sfBottomTexture, osg::SkyBackgroundBase::_sfBoxInside, osg::SkyBackgroundBase::_sfClearStencilBit, osg::SkyBackgroundBase::_sfFrontTexture, osg::SkyBackgroundBase::_sfLeftTexture, osg::SkyBackgroundBase::_sfRightTexture, osg::SkyBackgroundBase::_sfSphereRes, osg::SkyBackgroundBase::_sfTopTexture, osg::SkyBackgroundBase::BackTexCoordFieldMask, osg::SkyBackgroundBase::BackTextureFieldMask, osg::SkyBackgroundBase::BeaconFieldMask, osg::SkyBackgroundBase::BottomTexCoordFieldMask, osg::SkyBackgroundBase::BottomTextureFieldMask, osg::SkyBackgroundBase::BoxInsideFieldMask, osg::SkyBackgroundBase::ClearStencilBitFieldMask, osg::BackgroundBase::executeSyncImpl(), osg::SkyBackgroundBase::FrontTexCoordFieldMask, osg::SkyBackgroundBase::FrontTextureFieldMask, osg::SkyBackgroundBase::GroundAngleFieldMask, osg::SkyBackgroundBase::GroundColorFieldMask, osg::SkyBackgroundBase::LeftTexCoordFieldMask, osg::SkyBackgroundBase::LeftTextureFieldMask, osg::FieldBits::NoField, osg::SkyBackgroundBase::RightTexCoordFieldMask, osg::SkyBackgroundBase::RightTextureFieldMask, osg::SkyBackgroundBase::SkyAngleFieldMask, osg::SkyBackgroundBase::SkyColorFieldMask, osg::SkyBackgroundBase::SphereResFieldMask, osg::SField< FieldTypeT, fieldNameSpace >::syncWith(), osg::MField< FieldTypeT, fieldNameSpace >::syncWith(), osg::SkyBackgroundBase::TopTexCoordFieldMask, and osg::SkyBackgroundBase::TopTextureFieldMask.

Referenced by osg::SkyBackgroundBase::executeSync().

00772 {
00773 
00774     Inherited::executeSyncImpl(pOther, whichField);
00775 
00776     if(FieldBits::NoField != (SkyColorFieldMask & whichField))
00777         _mfSkyColor.syncWith(pOther->_mfSkyColor);
00778 
00779     if(FieldBits::NoField != (SkyAngleFieldMask & whichField))
00780         _mfSkyAngle.syncWith(pOther->_mfSkyAngle);
00781 
00782     if(FieldBits::NoField != (GroundColorFieldMask & whichField))
00783         _mfGroundColor.syncWith(pOther->_mfGroundColor);
00784 
00785     if(FieldBits::NoField != (GroundAngleFieldMask & whichField))
00786         _mfGroundAngle.syncWith(pOther->_mfGroundAngle);
00787 
00788     if(FieldBits::NoField != (SphereResFieldMask & whichField))
00789         _sfSphereRes.syncWith(pOther->_sfSphereRes);
00790 
00791     if(FieldBits::NoField != (BackTextureFieldMask & whichField))
00792         _sfBackTexture.syncWith(pOther->_sfBackTexture);
00793 
00794     if(FieldBits::NoField != (BottomTextureFieldMask & whichField))
00795         _sfBottomTexture.syncWith(pOther->_sfBottomTexture);
00796 
00797     if(FieldBits::NoField != (FrontTextureFieldMask & whichField))
00798         _sfFrontTexture.syncWith(pOther->_sfFrontTexture);
00799 
00800     if(FieldBits::NoField != (LeftTextureFieldMask & whichField))
00801         _sfLeftTexture.syncWith(pOther->_sfLeftTexture);
00802 
00803     if(FieldBits::NoField != (RightTextureFieldMask & whichField))
00804         _sfRightTexture.syncWith(pOther->_sfRightTexture);
00805 
00806     if(FieldBits::NoField != (TopTextureFieldMask & whichField))
00807         _sfTopTexture.syncWith(pOther->_sfTopTexture);
00808 
00809     if(FieldBits::NoField != (BoxInsideFieldMask & whichField))
00810         _sfBoxInside.syncWith(pOther->_sfBoxInside);
00811 
00812     if(FieldBits::NoField != (TopTexCoordFieldMask & whichField))
00813         _mfTopTexCoord.syncWith(pOther->_mfTopTexCoord);
00814 
00815     if(FieldBits::NoField != (BottomTexCoordFieldMask & whichField))
00816         _mfBottomTexCoord.syncWith(pOther->_mfBottomTexCoord);
00817 
00818     if(FieldBits::NoField != (RightTexCoordFieldMask & whichField))
00819         _mfRightTexCoord.syncWith(pOther->_mfRightTexCoord);
00820 
00821     if(FieldBits::NoField != (LeftTexCoordFieldMask & whichField))
00822         _mfLeftTexCoord.syncWith(pOther->_mfLeftTexCoord);
00823 
00824     if(FieldBits::NoField != (FrontTexCoordFieldMask & whichField))
00825         _mfFrontTexCoord.syncWith(pOther->_mfFrontTexCoord);
00826 
00827     if(FieldBits::NoField != (BackTexCoordFieldMask & whichField))
00828         _mfBackTexCoord.syncWith(pOther->_mfBackTexCoord);
00829 
00830     if(FieldBits::NoField != (BeaconFieldMask & whichField))
00831         _sfBeacon.syncWith(pOther->_sfBeacon);
00832 
00833     if(FieldBits::NoField != (ClearStencilBitFieldMask & whichField))
00834         _sfClearStencilBit.syncWith(pOther->_sfClearStencilBit);
00835 
00836 
00837 }

void BackgroundBase::executeSyncImpl ( BackgroundBase pOther,
const BitVector whichField 
) [protected, inherited]

void AttachmentContainer::executeSyncImpl ( AttachmentContainer pOther,
const BitVector whichField 
) [protected, inherited]

void osg::FieldContainer::executeSyncImpl ( FieldContainer pOther,
const BitVector whichField 
) [inline, protected, inherited]

void osg::SkyBackgroundBase::executeSync ( FieldContainer other,
const BitVector whichField 
) [protected, virtual, inherited]

Reimplemented from osg::BackgroundBase.

Definition at line 342 of file OSGSkyBackgroundBase.cpp.

References osg::SkyBackgroundBase::executeSyncImpl().

00344 {
00345     this->executeSyncImpl((SkyBackgroundBase *) &other, whichField);
00346 }

static const Char8* osg::Background::getClassname ( void   )  [inline, static, inherited]

Reimplemented in osg::GradientBackground, and osg::SolidBackground.

Definition at line 70 of file OSGBackground.h.

00070 { return "Background"; };

void AttachmentContainer::addAttachment ( const AttachmentPtr fieldContainerP,
UInt16  binding = 0 
) [inherited]

Definition at line 84 of file OSGAttachmentContainer.cpp.

References osg::addRefCP(), osg::beginEditCP(), osg::endEditCP(), osg::NullFC, and osg::subRefCP().

Referenced by osg::AttachmentContainer::AttachmentContainer(), osg::Node::onCreate(), and osg::Image::setAttachmentField().

00086 {
00087     UInt32 key;
00088 
00089     if(fieldContainerP == NullFC)
00090         return;
00091 
00092     key = (UInt32 (fieldContainerP->getGroupId()) << 16) | binding;
00093 
00094     addRefCP(fieldContainerP);
00095 
00096     beginEditCP(fieldContainerP, Attachment::ParentsFieldMask);
00097     {
00098         fieldContainerP->addParent(getPtr());
00099     }
00100     endEditCP  (fieldContainerP, Attachment::ParentsFieldMask);
00101 
00102     AttachmentMap::iterator fcI = _attachmentMap.getValue().find(key);
00103 
00104     if(fcI != _attachmentMap.getValue().end())
00105     {
00106         beginEditCP((*fcI).second, Attachment::ParentsFieldMask);
00107         {
00108             (*fcI).second->subParent(getPtr());
00109         }
00110         endEditCP  ((*fcI).second, Attachment::ParentsFieldMask);
00111 
00112         subRefCP((*fcI).second);
00113 
00114         (*fcI).second = fieldContainerP;
00115     }
00116     else
00117     {
00118         _attachmentMap.getValue()[key] = fieldContainerP;
00119     }
00120 }

void AttachmentContainer::subAttachment ( const AttachmentPtr fieldContainerP,
UInt16  binding = 0 
) [inherited]

Definition at line 122 of file OSGAttachmentContainer.cpp.

References osg::AttachmentContainer::_attachmentMap, osg::beginEditCP(), osg::endEditCP(), osg::AttachmentContainer::getPtr(), osg::SField< FieldTypeT, fieldNameSpace >::getValue(), osg::NullFC, osg::Attachment::ParentsFieldMask, and osg::subRefCP().

00124 {
00125     UInt32 key;
00126 
00127     AttachmentMap::iterator fcI;
00128 
00129     if(fieldContainerP == NullFC)
00130         return;
00131 
00132     key = (UInt32(fieldContainerP->getGroupId()) << 16) | binding;
00133 
00134     fcI = _attachmentMap.getValue().find(key);
00135 
00136     if(fcI != _attachmentMap.getValue().end())
00137     {
00138         beginEditCP(fieldContainerP, Attachment::ParentsFieldMask);
00139         {
00140             (*fcI).second->subParent(getPtr());
00141         }
00142         endEditCP  (fieldContainerP, Attachment::ParentsFieldMask);
00143 
00144         subRefCP((*fcI).second);
00145 
00146         _attachmentMap.getValue().erase(fcI);
00147     }
00148 }

AttachmentPtr AttachmentContainer::findAttachment ( UInt32  groupId,
UInt16  binding = 0 
) [inherited]

Definition at line 150 of file OSGAttachmentContainer.cpp.

References osg::AttachmentContainer::_attachmentMap, osg::SField< FieldTypeT, fieldNameSpace >::getValue(), and osg::NullFC.

Referenced by osg::Image::findAttachmentField(), and osg::Image::setAttachmentField().

00152 {
00153     UInt32 key = (UInt32(groupId) << 16) | binding;
00154 
00155     AttachmentMap::iterator fcI = _attachmentMap.getValue().find(key);
00156 
00157     if(fcI == _attachmentMap.getValue().end())
00158     {
00159         return NullFC;
00160     }
00161     else
00162     {
00163         return (*fcI).second;
00164     }
00165 }

AttachmentPtr osg::AttachmentContainer::findAttachment ( const FieldContainerType type,
UInt16  binding = 0 
) [inline, inherited]

Definition at line 57 of file OSGAttachmentContainerImpl.inl.

00060 {
00061     return findAttachment(type.getGroupId(), binding);
00062 }

SFAttachmentMap * AttachmentContainer::getSFAttachments ( void   )  [inherited]

Field Access

Definition at line 170 of file OSGAttachmentContainer.cpp.

References osg::AttachmentContainer::_attachmentMap.

00171 {
00172     return &_attachmentMap;
00173 }

AttachmentContainerPtr AttachmentContainer::getPtr ( void   )  [protected, inherited]

UInt16 osg::FieldContainer::getClassGroupId ( void   )  [inline, static, inherited]

Definition at line 71 of file OSGFieldContainerImpl.inl.

References osg::FieldContainer::_type, and osg::FieldContainerType::getGroupId().

00072 {
00073     return _type.getGroupId();
00074 }

UInt32 osg::FieldContainer::getTypeId ( void   )  const [inline, inherited]

Definition at line 77 of file OSGFieldContainerImpl.inl.

References osg::TypeBase::getId(), and osg::FieldContainer::getType().

Referenced by osg::TextureChunk::changeFrom(), and osg::CubeTextureChunk::changeFrom().

00078 {
00079     return getType().getId();
00080 }

UInt16 osg::FieldContainer::getGroupId ( void   )  const [inline, inherited]

const Char8 * osg::FieldContainer::getTypeName ( void   )  const [inline, inherited]

Definition at line 89 of file OSGFieldContainerImpl.inl.

References osg::TypeBase::getCName(), and osg::FieldContainer::getType().

00090 {
00091     return getType().getCName();
00092 }

Field * osg::FieldContainer::getField ( UInt32  fieldId  )  [inline, inherited]

Generic Field Access

Definition at line 95 of file OSGFieldContainerImpl.inl.

References osg::FieldDescription::getField(), osg::FieldContainerType::getFieldDescription(), and osg::FieldContainer::getType().

Referenced by osg::QFCItem::expand(), osg::VRMLShapeDesc::getFieldAndDesc(), osg::QFieldViewBase::getFieldPtr(), osg::QFieldEditorBase::getFieldPtr(), osg::getParentsField(), and osg::QFCItem::setup().

00096 {
00097     const FieldDescription *desc = getType().getFieldDescription(fieldId);
00098 
00099     return desc ? desc->getField(*this) : NULL;
00100 }

Field * osg::FieldContainer::getField ( const Char8 fieldName  )  [inline, inherited]

Generic Field Access

Definition at line 103 of file OSGFieldContainerImpl.inl.

References osg::FieldContainerType::findFieldDescription(), osg::FieldDescription::getField(), and osg::FieldContainer::getType().

00104 {
00105     const FieldDescription *desc =getType().findFieldDescription(fieldName);
00106 
00107     return desc ? desc->getField(*this) : NULL;
00108 }

template<class ObjectPtrT>
void osg::FieldContainer::newPtr ( ObjectPtrT &  result,
const typename ObjectPtrT::StoredObjectType *  prototypeP 
) [inline, static, protected, inherited]

Definition at line 138 of file OSGFieldContainerImpl.inl.

References osg::ChangeList::addCreated(), osg::PThreadBase::getAspect(), osg::PThreadBase::getCurrentChangeList(), osg::ThreadManager::getNumAspects(), osg::FieldContainerFactory::registerFieldContainer(), and osg::FieldContainerFactory::the().

Referenced by osg::XWindowBase::createEmpty(), osg::WIN32WindowBase::createEmpty(), osg::ViewportBase::createEmpty(), osg::VertexProgramChunkBase::createEmpty(), osg::TwoSidedLightingChunkBase::createEmpty(), osg::TransformChunkBase::createEmpty(), osg::TransformBase::createEmpty(), osg::TileCameraDecoratorBase::createEmpty(), osg::TextureTransformChunkBase::createEmpty(), osg::TextureGrabForegroundBase::createEmpty(), osg::TextureGrabBackgroundBase::createEmpty(), osg::TextureChunkBase::createEmpty(), osg::TextureBackgroundBase::createEmpty(), osg::TexGenChunkBase::createEmpty(), osg::SwitchMaterialBase::createEmpty(), osg::SwitchBase::createEmpty(), osg::SurfaceBase::createEmpty(), osg::StringAttributeMapBase::createEmpty(), osg::StereoBufferViewportBase::createEmpty(), osg::StencilChunkBase::createEmpty(), osg::StateSortingGroupBase::createEmpty(), osg::StateBase::createEmpty(), osg::SpotLightBase::createEmpty(), osg::SortFirstWindowBase::createEmpty(), osg::SolidBackgroundBase::createEmpty(), osg::SlicesBase::createEmpty(), osg::SkyBackgroundBase::createEmpty(), osg::SimpleTexturedMaterialBase::createEmpty(), osg::SimpleStatisticsForegroundBase::createEmpty(), osg::SimpleMaterialBase::createEmpty(), osg::SHLParameterChunkBase::createEmpty(), osg::SHLChunkBase::createEmpty(), osg::ShearedStereoCameraDecoratorBase::createEmpty(), osg::ShaderParameterVec4fBase::createEmpty(), osg::ShaderParameterVec3fBase::createEmpty(), osg::ShaderParameterVec2fBase::createEmpty(), osg::ShaderParameterStringBase::createEmpty(), osg::ShaderParameterRealBase::createEmpty(), osg::ShaderParameterMVec4fBase::createEmpty(), osg::ShaderParameterMVec3fBase::createEmpty(), osg::ShaderParameterMVec2fBase::createEmpty(), osg::ShaderParameterMRealBase::createEmpty(), osg::ShaderParameterMMatrixBase::createEmpty(), osg::ShaderParameterMIntBase::createEmpty(), osg::ShaderParameterMatrixBase::createEmpty(), osg::ShaderParameterIntBase::createEmpty(), osg::ShaderParameterBoolBase::createEmpty(), osg::ScreenGroupBase::createEmpty(), osg::SClipPlaneChunkBase::createEmpty(), osg::ResolutionDisplayFilterBase::createEmpty(), osg::RenderOptionsBase::createEmpty(), osg::RegisterCombinersChunkBase::createEmpty(), osg::QTWindowBase::createEmpty(), osg::ProxyGroupBase::createEmpty(), osg::ProjectionCameraDecoratorBase::createEmpty(), osg::PolygonForegroundBase::createEmpty(), osg::PolygonChunkBase::createEmpty(), osg::PolygonBackgroundBase::createEmpty(), osg::PointLightBase::createEmpty(), osg::PointChunkBase::createEmpty(), osg::PhongMaterialBase::createEmpty(), osg::PerspectiveCameraBase::createEmpty(), osg::PassiveWindowBase::createEmpty(), osg::PassiveViewportBase::createEmpty(), osg::PassiveBackgroundBase::createEmpty(), osg::ParticlesBase::createEmpty(), osg::OrthographicCameraBase::createEmpty(), osg::OffCenterPerspectiveCameraBase::createEmpty(), osg::MultiPassMaterialBase::createEmpty(), osg::MultiDisplayWindowBase::createEmpty(), osg::MatrixCameraDecoratorBase::createEmpty(), osg::MatrixCameraBase::createEmpty(), osg::MaterialPoolBase::createEmpty(), osg::MaterialGroupBase::createEmpty(), osg::MaterialChunkBase::createEmpty(), osg::LogicOpChunkBase::createEmpty(), osg::LineChunkBase::createEmpty(), osg::LightModelChunkBase::createEmpty(), osg::LightEnvBase::createEmpty(), osg::LightChunkBase::createEmpty(), osg::InverseTransformBase::createEmpty(), osg::InlineBase::createEmpty(), osg::ImageForegroundBase::createEmpty(), osg::ImageBase::createEmpty(), osg::ImageBackgroundBase::createEmpty(), osg::GroupBase::createEmpty(), osg::GraphicStatisticsForegroundBase::createEmpty(), osg::GradientBackgroundBase::createEmpty(), osg::GrabForegroundBase::createEmpty(), osg::GLUTWindowBase::createEmpty(), osg::GeometryBase::createEmpty(), osg::FresnelMaterialBase::createEmpty(), osg::FragmentProgramChunkBase::createEmpty(), osg::FileGrabForegroundBase::createEmpty(), osg::FCPtrAttributeMapBase::createEmpty(), osg::FBOViewportBase::createEmpty(), osg::FatBorderChunkBase::createEmpty(), osg::DVRVolumeTextureBase::createEmpty(), osg::DVRVolumeBase::createEmpty(), osg::DVRSimpleShaderBase::createEmpty(), osg::DVRSimpleLUTShaderBase::createEmpty(), osg::DVRMtexLUTShaderBase::createEmpty(), osg::DVRLookupTableBase::createEmpty(), osg::DVRIsoSurfaceBase::createEmpty(), osg::DVRIsoShaderBase::createEmpty(), osg::DVRGeometryBase::createEmpty(), osg::DVRClipObjectsBase::createEmpty(), osg::DVRClipGeometryBase::createEmpty(), osg::DVRAppearanceBase::createEmpty(), osg::DistortionDisplayFilterBase::createEmpty(), osg::DistanceLODBase::createEmpty(), osg::DisplayFilterForegroundBase::createEmpty(), osg::DisplayCalibrationBase::createEmpty(), osg::DirectionalLightBase::createEmpty(), osg::DepthClearBackgroundBase::createEmpty(), osg::DepthChunkBase::createEmpty(), osg::CubeTextureChunkBase::createEmpty(), osg::ComponentTransformBase::createEmpty(), osg::ColorMaskChunkBase::createEmpty(), osg::ColorDisplayFilterBase::createEmpty(), osg::ColorBufferViewportBase::createEmpty(), osg::ClusterWindowBase::createEmpty(), osg::ClipPlaneChunkBase::createEmpty(), osg::ClipPlaneBase::createEmpty(), osg::ChunkMaterialBase::createEmpty(), osg::BlendChunkBase::createEmpty(), osg::BillboardBase::createEmpty(), osg::XWindowBase::shallowCopy(), osg::WIN32WindowBase::shallowCopy(), osg::ViewportBase::shallowCopy(), osg::VertexProgramChunkBase::shallowCopy(), osg::TwoSidedLightingChunkBase::shallowCopy(), osg::TransformChunkBase::shallowCopy(), osg::TransformBase::shallowCopy(), osg::TileCameraDecoratorBase::shallowCopy(), osg::TextureTransformChunkBase::shallowCopy(), osg::TextureGrabForegroundBase::shallowCopy(), osg::TextureGrabBackgroundBase::shallowCopy(), osg::TextureChunkBase::shallowCopy(), osg::TextureBackgroundBase::shallowCopy(), osg::TexGenChunkBase::shallowCopy(), osg::SwitchMaterialBase::shallowCopy(), osg::SwitchBase::shallowCopy(), osg::SurfaceBase::shallowCopy(), osg::StringAttributeMapBase::shallowCopy(), osg::StereoBufferViewportBase::shallowCopy(), osg::StencilChunkBase::shallowCopy(), osg::StateSortingGroupBase::shallowCopy(), osg::StateBase::shallowCopy(), osg::SpotLightBase::shallowCopy(), osg::SortFirstWindowBase::shallowCopy(), osg::SolidBackgroundBase::shallowCopy(), osg::SlicesBase::shallowCopy(), osg::SkyBackgroundBase::shallowCopy(), osg::SimpleTexturedMaterialBase::shallowCopy(), osg::SimpleStatisticsForegroundBase::shallowCopy(), osg::SimpleMaterialBase::shallowCopy(), osg::SHLParameterChunkBase::shallowCopy(), osg::SHLChunkBase::shallowCopy(), osg::ShearedStereoCameraDecoratorBase::shallowCopy(), osg::ShaderParameterVec4fBase::shallowCopy(), osg::ShaderParameterVec3fBase::shallowCopy(), osg::ShaderParameterVec2fBase::shallowCopy(), osg::ShaderParameterStringBase::shallowCopy(), osg::ShaderParameterRealBase::shallowCopy(), osg::ShaderParameterMVec4fBase::shallowCopy(), osg::ShaderParameterMVec3fBase::shallowCopy(), osg::ShaderParameterMVec2fBase::shallowCopy(), osg::ShaderParameterMRealBase::shallowCopy(), osg::ShaderParameterMMatrixBase::shallowCopy(), osg::ShaderParameterMIntBase::shallowCopy(), osg::ShaderParameterMatrixBase::shallowCopy(), osg::ShaderParameterIntBase::shallowCopy(), osg::ShaderParameterBoolBase::shallowCopy(), osg::ScreenGroupBase::shallowCopy(), osg::SClipPlaneChunkBase::shallowCopy(), osg::ResolutionDisplayFilterBase::shallowCopy(), osg::RenderOptionsBase::shallowCopy(), osg::RegisterCombinersChunkBase::shallowCopy(), osg::QTWindowBase::shallowCopy(), osg::ProxyGroupBase::shallowCopy(), osg::ProjectionCameraDecoratorBase::shallowCopy(), osg::PolygonForegroundBase::shallowCopy(), osg::PolygonChunkBase::shallowCopy(), osg::PolygonBackgroundBase::shallowCopy(), osg::PointLightBase::shallowCopy(), osg::PointChunkBase::shallowCopy(), osg::PhongMaterialBase::shallowCopy(), osg::PerspectiveCameraBase::shallowCopy(), osg::PassiveWindowBase::shallowCopy(), osg::PassiveViewportBase::shallowCopy(), osg::PassiveBackgroundBase::shallowCopy(), osg::ParticlesBase::shallowCopy(), osg::OrthographicCameraBase::shallowCopy(), osg::OffCenterPerspectiveCameraBase::shallowCopy(), osg::MultiPassMaterialBase::shallowCopy(), osg::MultiDisplayWindowBase::shallowCopy(), osg::MatrixCameraDecoratorBase::shallowCopy(), osg::MatrixCameraBase::shallowCopy(), osg::MaterialPoolBase::shallowCopy(), osg::MaterialGroupBase::shallowCopy(), osg::MaterialChunkBase::shallowCopy(), osg::LogicOpChunkBase::shallowCopy(), osg::LineChunkBase::shallowCopy(), osg::LightModelChunkBase::shallowCopy(), osg::LightEnvBase::shallowCopy(), osg::LightChunkBase::shallowCopy(), osg::InverseTransformBase::shallowCopy(), osg::InlineBase::shallowCopy(), osg::ImageForegroundBase::shallowCopy(), osg::ImageBase::shallowCopy(), osg::ImageBackgroundBase::shallowCopy(), osg::GroupBase::shallowCopy(), osg::GraphicStatisticsForegroundBase::shallowCopy(), osg::GradientBackgroundBase::shallowCopy(), osg::GrabForegroundBase::shallowCopy(), osg::GLUTWindowBase::shallowCopy(), osg::GeometryBase::shallowCopy(), osg::FresnelMaterialBase::shallowCopy(), osg::FragmentProgramChunkBase::shallowCopy(), osg::FileGrabForegroundBase::shallowCopy(), osg::FCPtrAttributeMapBase::shallowCopy(), osg::FBOViewportBase::shallowCopy(), osg::FatBorderChunkBase::shallowCopy(), osg::DVRVolumeTextureBase::shallowCopy(), osg::DVRVolumeBase::shallowCopy(), osg::DVRSimpleShaderBase::shallowCopy(), osg::DVRSimpleLUTShaderBase::shallowCopy(), osg::DVRMtexLUTShaderBase::shallowCopy(), osg::DVRLookupTableBase::shallowCopy(), osg::DVRIsoSurfaceBase::shallowCopy(), osg::DVRIsoShaderBase::shallowCopy(), osg::DVRGeometryBase::shallowCopy(), osg::DVRClipObjectsBase::shallowCopy(), osg::DVRClipGeometryBase::shallowCopy(), osg::DVRAppearanceBase::shallowCopy(), osg::DistortionDisplayFilterBase::shallowCopy(), osg::DistanceLODBase::shallowCopy(), osg::DisplayFilterForegroundBase::shallowCopy(), osg::DisplayCalibrationBase::shallowCopy(), osg::DirectionalLightBase::shallowCopy(), osg::DepthClearBackgroundBase::shallowCopy(), osg::DepthChunkBase::shallowCopy(), osg::CubeTextureChunkBase::shallowCopy(), osg::ComponentTransformBase::shallowCopy(), osg::ColorMaskChunkBase::shallowCopy(), osg::ColorDisplayFilterBase::shallowCopy(), osg::ColorBufferViewportBase::shallowCopy(), osg::ClusterWindowBase::shallowCopy(), osg::ClipPlaneChunkBase::shallowCopy(), osg::ClipPlaneBase::shallowCopy(), osg::ChunkMaterialBase::shallowCopy(), osg::BlendChunkBase::shallowCopy(), and osg::BillboardBase::shallowCopy().

00141 {
00142     typedef typename ObjectPtrT::StoredObjectType ObjectType;
00143     
00144     UInt8 *pTmp;
00145     
00146     result._containerSize = sizeof(ObjectType);
00147     
00148     pTmp        = 
00149         static_cast<UInt8 *>(operator new(
00150             sizeof(Int32)      + // ReferenceCount
00151             sizeof(UInt32)     + // ContainerId
00152             sizeof(ObjectType) * ThreadManager::getNumAspects()));
00153     
00154     *(reinterpret_cast<Int32 *>(pTmp)) = 0;
00155     
00156     pTmp += sizeof(Int32);
00157     
00158     result._storeP = (pTmp + sizeof(UInt32));
00159 
00160 #ifdef OSG_DEBUG_FCPTR
00161     result._typedStoreP = reinterpret_cast<FieldContainer *>(result._storeP);
00162 #endif
00163 
00164     *(reinterpret_cast<UInt32 *>(pTmp)) = 
00165         FieldContainerFactory::the()->registerFieldContainer(result);
00166     
00167     Thread::getCurrentChangeList()->addCreated(
00168         *(reinterpret_cast<UInt32 *>(pTmp)));
00169     
00170     pTmp += sizeof(UInt32);
00171     
00172     ObjectType *aObject = reinterpret_cast<ObjectType *>(pTmp);
00173 
00174     for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++)
00175     {
00176         pTmp = 
00177             reinterpret_cast<UInt8 *>(new (pTmp) ObjectType(*prototypeP));
00178         
00179         pTmp += sizeof(ObjectType);
00180     }
00181     
00182     result->onCreate(prototypeP);
00183 
00184     for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++)
00185     {
00186         aObject[i].onCreateAspect(aObject, prototypeP);
00187     }
00188 
00189 #if defined(OSG_GV_BETA) && defined(OSG_DBG_MEM)
00190 
00191     fprintf(stderr, "GV_MEM_FC_DBG : (%u) cc (%p|%u)\n", 
00192             Thread::getAspect(),
00193             result._storeP,
00194 //            ObjectType::getClassType().getCName(),
00195             ObjectType::getClassType().getId());
00196 #endif
00197 
00198 #ifdef OSG_DEBUG_TYPED_FCPTR
00199     result.updateTypedStore();
00200 #endif
00201 }

template<class ObjectPtrT>
void osg::FieldContainer::newPtr ( ObjectPtrT &  result  )  [inline, static, protected, inherited]

Definition at line 204 of file OSGFieldContainerImpl.inl.

References osg::ChangeList::addCreated(), osg::PThreadBase::getAspect(), osg::PThreadBase::getCurrentChangeList(), osg::ThreadManager::getNumAspects(), osg::FieldContainerFactory::registerFieldContainer(), and osg::FieldContainerFactory::the().

00205 {
00206     typedef typename ObjectPtrT::StoredObjectType ObjectType;
00207     
00208     UInt8 *pTmp;
00209     
00210     result._containerSize = sizeof(ObjectType);
00211     
00212     pTmp        =             
00213         static_cast<UInt8 *>(operator new(
00214             sizeof(Int32)      + // ReferenceCount
00215             sizeof(UInt32)     + // ContainerId
00216             sizeof(ObjectType) * ThreadManager::getNumAspects()));
00217     
00218     *(reinterpret_cast<Int32 *>(pTmp)) = 0;
00219     
00220     pTmp  += sizeof(Int32);
00221     
00222     result._storeP = (pTmp + sizeof(UInt32));
00223     
00224 #ifdef OSG_DEBUG_FCPTR
00225     result._typedStoreP = reinterpret_cast<FieldContainer *>(result._storeP);
00226 #endif
00227 
00228     *(reinterpret_cast<UInt32 *>(pTmp)) = 
00229         FieldContainerFactory::the()->registerFieldContainer(result);
00230     
00231     Thread::getCurrentChangeList()->addCreated(
00232         *(reinterpret_cast<UInt32 *>(pTmp)));
00233     
00234     pTmp += sizeof(UInt32);
00235     
00236     ObjectType *aObject = reinterpret_cast<ObjectType *>(pTmp);
00237 
00238     for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++)
00239     {
00240         pTmp = reinterpret_cast<UInt8 *>(new (pTmp) ObjectType());
00241         
00242         pTmp += sizeof(ObjectType);
00243     }
00244     
00245     result->onCreate();
00246     
00247     for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++)
00248     {
00249         aObject[i].onCreateAspect(aObject);
00250     }
00251 
00252 #if defined(OSG_GV_BETA) && defined(OSG_DBG_MEM)
00253     fprintf(stderr, "GV_MEM_FC_DBG : (%u) c (%p|%u)\n", 
00254             Thread::getAspect(),
00255             result._storeP,
00256 //            ObjectType::getClassType().getCName(),
00257             ObjectType::getClassType().getId());
00258 #endif
00259     
00260 #ifdef OSG_DEBUG_TYPED_FCPTR
00261     result.updateTypedStore();
00262 #endif
00263 }

template<class FieldTypeT>
void osg::FieldContainer::beginEditX ( const BitVector whichField,
FieldTypeT &  field 
) [inline, protected, inherited]

Definition at line 285 of file OSGFieldContainerImpl.inl.

00286 {
00287 //    fieldR.beginEdit();
00288 }

template<class FieldTypeT>
void osg::FieldContainer::endEditX ( const BitVector whichField,
FieldTypeT &  field 
) [inline, protected, inherited]

Definition at line 291 of file OSGFieldContainerImpl.inl.

References osg::endEditCP().

00292 {
00293     FieldContainerPtr tmpPtr(this);
00294     endEditCP(tmpPtr, whichField);
00295 }

void osg::FieldContainer::onCreate ( const FieldContainer source = NULL  )  [inline, protected, inherited]

Definition at line 318 of file OSGFieldContainerImpl.inl.

Referenced by osg::ShaderParameterChunk::onCreate().

00319 {
00320 }

void osg::FieldContainer::onCreateAspect ( const FieldContainer aspect0,
const FieldContainer source = NULL 
) [inline, protected, inherited]

Definition at line 323 of file OSGFieldContainerImpl.inl.

00325 {
00326 }

void FieldContainer::onDestroy ( void   )  [protected, virtual, inherited]


Friends And Related Function Documentation

friend class FieldContainer [friend]

Reimplemented from osg::SkyBackgroundBase.

Definition at line 128 of file OSGSkyBackground.h.

friend class SkyBackgroundBase [friend]

Definition at line 129 of file OSGSkyBackground.h.


Member Data Documentation

std::vector<Real32> osg::SkyBackground::_cosval [private]

Definition at line 133 of file OSGSkyBackground.h.

Referenced by clear().

std::vector<Real32> osg::SkyBackground::_sinval [private]

Definition at line 134 of file OSGSkyBackground.h.

Referenced by clear().

Initial value:

 
    (Inherited::MTInfluenceMask) | 
    (static_cast<BitVector>(0x0) << Inherited::NextFieldId)

Reimplemented from osg::BackgroundBase.

Definition at line 158 of file OSGSkyBackgroundBase.h.

The colors for the sky gradient bands. Corresponds to the skyAngle angles. The first value is for the apex (i.e. straight up), which doesn't need an angle, thus there should be one more color than angles. If no angles are given color[0] is used, or black if none are given.

Definition at line 311 of file OSGSkyBackgroundBase.h.

Referenced by clear(), osg::SkyBackgroundBase::copyFromBin(), osg::SkyBackgroundBase::copyToBin(), osg::SkyBackgroundBase::executeSyncImpl(), osg::SkyBackgroundBase::getBinSize(), osg::SkyBackgroundBase::getMFSkyColor(), and osg::SkyBackgroundBase::getSkyColor().

The angles for the sky gradient bands. Corresponds to the skyColor colors, with the exception of the apex. Values should be between 0 and PI.

Definition at line 312 of file OSGSkyBackgroundBase.h.

Referenced by clear(), osg::SkyBackgroundBase::copyFromBin(), osg::SkyBackgroundBase::copyToBin(), osg::SkyBackgroundBase::executeSyncImpl(), osg::SkyBackgroundBase::getBinSize(), osg::SkyBackgroundBase::getMFSkyAngle(), and osg::SkyBackgroundBase::getSkyAngle().

bool osg::SkyBackgroundBase::_sfBoxInside [protected, inherited]

const BitVector osg::FieldContainer::NextFieldMask [static, inherited]

Initial value:

 
                    (TypeTraits<BitVector>::One << NextFieldId)

Definition at line 75 of file OSGFieldContainerImpl.h.

const bool osg::FieldContainer::isNodeCore = false [static, inherited]

Reimplemented in osg::NodeCore.

Definition at line 181 of file OSGFieldContainerImpl.h.

UInt32 osg::FieldContainer::_shares [protected, inherited]

Definition at line 199 of file OSGFieldContainerImpl.h.


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

Generated on Mon Mar 17 12:19:29 2008 for OpenSG by  doxygen 1.5.5