Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osg::DVRSimpleShaderBase Class Reference

DVRSimpleShader Base Class.

#include <OSGDVRSimpleShaderBase.h>

Inheritance diagram for osg::DVRSimpleShaderBase:

osg::DVRShader osg::DVRShaderBase osg::FieldContainer osg::DVRSimpleShader osg::DVRSimpleLUTShaderBase osg::DVRSimpleLUTShader osg::DVRMtexLUTShaderBase osg::DVRMtexLUTShader List of all members.

Volume Rendering

*virtual bool initialize (DVRVolume *volume, DrawActionBase *action)
virtual void activate (DVRVolume *volume, DrawActionBase *action)
virtual void brickActivate (DVRVolume *volume, DrawActionBase *action, Brick *brick)
virtual void deactivate (DVRVolume *volume, DrawActionBase *action)
virtual void renderSlice (DVRVolume *volume, DrawActionBase *action, Real32 *data, UInt32 vertices, UInt32 values)
virtual void renderSlice (DVRVolume *volume, DrawActionBase *action, DVRRenderSlice *clippedSlice)
virtual bool hasRenderCallback (void)
virtual bool useMTSlabs (void)

Sync

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

Public Types

typedef DVRSimpleShaderPtr Ptr
enum  { NextFieldId = 1 }

Public Member Functions

FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
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
Sync
*virtual void changed (BitVector whichField, UInt32 from)
 react to field changes
Output
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
 output the instance for debug purposes

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 DVRSimpleShaderPtr create (void)
 create a new instance of the class
static DVRSimpleShaderPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype

Static Public Attributes

static const osg::BitVector MTInfluenceMask
static const BitVector NextFieldMask

Protected Member Functions

Constructors
DVRSimpleShaderBase (void)
 DVRSimpleShaderBase (const DVRSimpleShaderBase &source)
Destructors
*virtual ~DVRSimpleShaderBase (void)

Private Types

typedef DVRShader Inherited

Private Member Functions

void operator= (const DVRSimpleShaderBase &source)

Static Private Attributes

static FieldContainerType _type

Friends

class FieldContainer

Detailed Description

Definition at line 80 of file OSGDVRSimpleShaderBase.h.


Member Typedef Documentation

typedef DVRShader osg::DVRSimpleShaderBase::Inherited [private]
 

Reimplemented from osg::DVRShader.

Reimplemented in osg::DVRMtexLUTShader, osg::DVRMtexLUTShaderBase, osg::DVRSimpleLUTShader, osg::DVRSimpleLUTShaderBase, and osg::DVRSimpleShader.

Definition at line 84 of file OSGDVRSimpleShaderBase.h.

typedef DVRSimpleShaderPtr osg::DVRSimpleShaderBase::Ptr
 

Reimplemented from osg::DVRShaderBase.

Reimplemented in osg::DVRMtexLUTShaderBase, and osg::DVRSimpleLUTShaderBase.

Definition at line 89 of file OSGDVRSimpleShaderBase.h.


Member Enumeration Documentation

anonymous enum [inherited]
 

Enumerator:
NextFieldId 

Definition at line 73 of file OSGFieldContainerImpl.h.

00073 { NextFieldId = 1 };


Constructor & Destructor Documentation

DVRSimpleShaderBase::DVRSimpleShaderBase void   )  [protected]
 

Definition at line 144 of file OSGDVRSimpleShaderBase.cpp.

00144                                              :
00145     Inherited() 
00146 {
00147 }

DVRSimpleShaderBase::DVRSimpleShaderBase const DVRSimpleShaderBase source  )  [protected]
 

Definition at line 153 of file OSGDVRSimpleShaderBase.cpp.

00153                                                                           :
00154     Inherited                 (source)
00155 {
00156 }

DVRSimpleShaderBase::~DVRSimpleShaderBase void   )  [protected, virtual]
 

Definition at line 160 of file OSGDVRSimpleShaderBase.cpp.

00161 {
00162 }


Member Function Documentation

osg::FieldContainerType & osg::DVRSimpleShaderBase::getClassType void   )  [inline, static]
 

Reimplemented from osg::DVRShaderBase.

Reimplemented in osg::DVRMtexLUTShaderBase, and osg::DVRSimpleLUTShaderBase.

Definition at line 58 of file OSGDVRSimpleShaderBase.inl.

References _type.

Referenced by create().

00059 {
00060     return _type; 
00061 } 

osg::UInt32 osg::DVRSimpleShaderBase::getClassTypeId void   )  [inline, static]
 

Reimplemented from osg::DVRShaderBase.

Reimplemented in osg::DVRMtexLUTShaderBase, and osg::DVRSimpleLUTShaderBase.

Definition at line 65 of file OSGDVRSimpleShaderBase.inl.

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

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

FieldContainerType & DVRSimpleShaderBase::getType void   )  [virtual]
 

Reimplemented from osg::DVRShaderBase.

Reimplemented in osg::DVRMtexLUTShaderBase, and osg::DVRSimpleLUTShaderBase.

Definition at line 86 of file OSGDVRSimpleShaderBase.cpp.

References _type.

00087 {
00088     return _type; 
00089 } 

const FieldContainerType & DVRSimpleShaderBase::getType void   )  const [virtual]
 

Reimplemented from osg::DVRShaderBase.

Reimplemented in osg::DVRMtexLUTShaderBase, and osg::DVRSimpleLUTShaderBase.

Definition at line 91 of file OSGDVRSimpleShaderBase.cpp.

References _type.

00092 {
00093     return _type;
00094 } 

UInt32 DVRSimpleShaderBase::getContainerSize void   )  const [virtual]
 

Reimplemented from osg::DVRShaderBase.

Reimplemented in osg::DVRMtexLUTShaderBase, and osg::DVRSimpleLUTShaderBase.

Definition at line 106 of file OSGDVRSimpleShaderBase.cpp.

00107 { 
00108     return sizeof(DVRSimpleShader); 
00109 }

UInt32 DVRSimpleShaderBase::getBinSize const BitVector whichField  )  [virtual]
 

Reimplemented from osg::DVRShaderBase.

Reimplemented in osg::DVRMtexLUTShaderBase, and osg::DVRSimpleLUTShaderBase.

Definition at line 166 of file OSGDVRSimpleShaderBase.cpp.

References osg::DVRShaderBase::getBinSize().

Referenced by osg::DVRSimpleLUTShaderBase::getBinSize().

00167 {
00168     UInt32 returnValue = Inherited::getBinSize(whichField);
00169 
00170 
00171     return returnValue;
00172 }

void DVRSimpleShaderBase::copyToBin BinaryDataHandler pMem,
const BitVector whichField
[virtual]
 

Reimplemented from osg::DVRShaderBase.

Reimplemented in osg::DVRMtexLUTShaderBase, and osg::DVRSimpleLUTShaderBase.

Definition at line 174 of file OSGDVRSimpleShaderBase.cpp.

References osg::DVRShaderBase::copyToBin().

Referenced by osg::DVRSimpleLUTShaderBase::copyToBin().

00176 {
00177     Inherited::copyToBin(pMem, whichField);
00178 
00179 
00180 }

void DVRSimpleShaderBase::copyFromBin BinaryDataHandler pMem,
const BitVector whichField
[virtual]
 

Reimplemented from osg::DVRShaderBase.

Reimplemented in osg::DVRMtexLUTShaderBase, and osg::DVRSimpleLUTShaderBase.

Definition at line 182 of file OSGDVRSimpleShaderBase.cpp.

References osg::DVRShaderBase::copyFromBin().

Referenced by osg::DVRSimpleLUTShaderBase::copyFromBin().

00184 {
00185     Inherited::copyFromBin(pMem, whichField);
00186 
00187 
00188 }

DVRSimpleShaderPtr osg::DVRSimpleShaderBase::create void   )  [inline, static]
 

Reimplemented in osg::DVRMtexLUTShaderBase, and osg::DVRSimpleLUTShaderBase.

Definition at line 72 of file OSGDVRSimpleShaderBase.inl.

References getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and shallowCopy().

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

DVRSimpleShaderPtr osg::DVRSimpleShaderBase::createEmpty void   )  [inline, static]
 

Reimplemented in osg::DVRMtexLUTShaderBase, and osg::DVRSimpleLUTShaderBase.

Definition at line 87 of file OSGDVRSimpleShaderBase.inl.

References osg::FieldContainer::newPtr().

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

FieldContainerPtr DVRSimpleShaderBase::shallowCopy void   )  const [virtual]
 

Implements osg::FieldContainer.

Reimplemented in osg::DVRMtexLUTShaderBase, and osg::DVRSimpleLUTShaderBase.

Definition at line 97 of file OSGDVRSimpleShaderBase.cpp.

References osg::FieldContainer::newPtr().

Referenced by create().

00098 { 
00099     DVRSimpleShaderPtr returnValue; 
00100 
00101     newPtr(returnValue, dynamic_cast<const DVRSimpleShader *>(this)); 
00102 
00103     return returnValue; 
00104 }

void DVRSimpleShaderBase::executeSyncImpl DVRSimpleShaderBase pOther,
const BitVector whichField
[protected]
 

Definition at line 191 of file OSGDVRSimpleShaderBase.cpp.

References osg::DVRShaderBase::executeSyncImpl().

Referenced by executeSync(), and osg::DVRSimpleLUTShaderBase::executeSyncImpl().

00193 {
00194 
00195     Inherited::executeSyncImpl(pOther, whichField);
00196 
00197 
00198 }

void DVRSimpleShaderBase::executeSync FieldContainer other,
const BitVector whichField
[protected, virtual]
 

Reimplemented from osg::DVRShaderBase.

Reimplemented in osg::DVRMtexLUTShaderBase, and osg::DVRSimpleLUTShaderBase.

Definition at line 113 of file OSGDVRSimpleShaderBase.cpp.

References executeSyncImpl().

00115 {
00116     this->executeSyncImpl((DVRSimpleShaderBase *) &other, whichField);
00117 }

void osg::DVRSimpleShaderBase::operator= const DVRSimpleShaderBase source  )  [private]
 

void DVRShader::changed BitVector  whichField,
UInt32  from
[virtual, inherited]
 

Reimplemented from osg::FieldContainer.

Reimplemented in osg::DVRIsoShader, osg::DVRMtexLUTShader, osg::DVRSimpleLUTShader, and osg::DVRSimpleShader.

Definition at line 138 of file OSGDVRShader.cpp.

References osg::FieldContainer::changed().

Referenced by osg::DVRSimpleShader::changed(), and osg::DVRIsoShader::changed().

00139 {
00140     Inherited::changed(whichField, origin);
00141 }

void DVRShader::dump UInt32  uiIndent = 0,
const BitVector  bvFlags = 0
const [virtual, inherited]
 

Implements osg::FieldContainer.

Reimplemented in osg::DVRIsoShader, osg::DVRMtexLUTShader, osg::DVRSimpleLUTShader, and osg::DVRSimpleShader.

Definition at line 144 of file OSGDVRShader.cpp.

References SLOG.

00146 {
00147     SLOG << "Dump DVRShader NI" << std::endl;
00148 }

bool DVRShader::initialize DVRVolume volume,
DrawActionBase action
[virtual, inherited]
 

Reimplemented in osg::DVRIsoShader, osg::DVRMtexLUTShader, osg::DVRSimpleLUTShader, and osg::DVRSimpleShader.

Definition at line 57 of file OSGDVRShader.cpp.

References SLOG.

00059 {
00060     SLOG << "DVRShader::initialize - NI" << std::endl;
00061 
00062     return false;
00063 }

void DVRShader::activate DVRVolume volume,
DrawActionBase action
[virtual, inherited]
 

Reimplemented in osg::DVRIsoShader, osg::DVRMtexLUTShader, osg::DVRSimpleLUTShader, and osg::DVRSimpleShader.

Definition at line 66 of file OSGDVRShader.cpp.

References SLOG.

00068 {
00069     SLOG << "DVRShader::activate - NI" << std::endl;
00070 }

void DVRShader::brickActivate DVRVolume volume,
DrawActionBase action,
Brick brick
[virtual, inherited]
 

Reimplemented in osg::DVRIsoShader, osg::DVRSimpleLUTShader, and osg::DVRSimpleShader.

Definition at line 72 of file OSGDVRShader.cpp.

References SLOG.

00075 {
00076     SLOG << "DVRShader::brickActivate - NI" << std::endl;
00077 }

void DVRShader::deactivate DVRVolume volume,
DrawActionBase action
[virtual, inherited]
 

Reimplemented in osg::DVRIsoShader, osg::DVRMtexLUTShader, osg::DVRSimpleLUTShader, and osg::DVRSimpleShader.

Definition at line 79 of file OSGDVRShader.cpp.

References SLOG.

00081 {
00082     SLOG << "DVRShader::brickActivate - NI" << std::endl;
00083 }

void DVRShader::renderSlice DVRVolume volume,
DrawActionBase action,
Real32 data,
UInt32  vertices,
UInt32  values
[virtual, inherited]
 

Reimplemented in osg::DVRIsoShader, and osg::DVRMtexLUTShader.

Definition at line 85 of file OSGDVRShader.cpp.

References SLOG.

00090 {
00091     SLOG << "DVRShader::renderSlice - NI" << std::endl;
00092 }

void DVRShader::renderSlice DVRVolume volume,
DrawActionBase action,
DVRRenderSlice clippedSlice
[virtual, inherited]
 

Reimplemented in osg::DVRIsoShader, and osg::DVRMtexLUTShader.

Definition at line 94 of file OSGDVRShader.cpp.

References SLOG.

00097 {
00098     SLOG << "DVRShader::renderSlice - NI" << std::endl;
00099 }

bool DVRShader::hasRenderCallback void   )  [virtual, inherited]
 

Reimplemented in osg::DVRIsoShader, and osg::DVRMtexLUTShader.

Definition at line 101 of file OSGDVRShader.cpp.

00102 {
00103     return false; 
00104 }

bool DVRShader::useMTSlabs void   )  [virtual, inherited]
 

Reimplemented in osg::DVRIsoShader, and osg::DVRMtexLUTShader.

Definition at line 106 of file OSGDVRShader.cpp.

00107 {
00108     return false; 
00109 }; 

void DVRShaderBase::executeSyncImpl DVRShaderBase pOther,
const BitVector whichField
[protected, inherited]
 

Definition at line 182 of file OSGDVRShaderBase.cpp.

References osg::FieldContainer::executeSyncImpl().

Referenced by osg::DVRShaderBase::executeSync(), executeSyncImpl(), and osg::DVRIsoShaderBase::executeSyncImpl().

00184 {
00185 
00186     Inherited::executeSyncImpl(pOther, whichField);
00187 
00188 
00189 }

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

Definition at line 333 of file OSGFieldContainerImpl.inl.

Referenced by osg::StateBase::executeSyncImpl(), osg::DVRShaderBase::executeSyncImpl(), osg::DVRClipGeometryBase::executeSyncImpl(), osg::AttachmentContainer::executeSyncImpl(), and osg::Attachment::executeSyncImpl().

00335 {
00336 }

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]
 

Definition at line 83 of file OSGFieldContainerImpl.inl.

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

Referenced by osg::Image::setAttachmentField().

00084 {
00085     return getType().getGroupId();
00086 }

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]
 

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]
 

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::SwitchBase::createEmpty(), osg::SurfaceBase::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::ShaderParameterMatrixBase::createEmpty(), osg::ShaderParameterIntBase::createEmpty(), osg::ShaderParameterBoolBase::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::OffCenterPerspectiveCameraBase::createEmpty(), osg::MultiPassMaterialBase::createEmpty(), osg::MultiDisplayWindowBase::createEmpty(), osg::MatrixCameraDecoratorBase::createEmpty(), osg::MatrixCameraBase::createEmpty(), osg::MaterialPoolBase::createEmpty(), osg::MaterialGroupBase::createEmpty(), osg::MaterialChunkBase::createEmpty(), osg::LineChunkBase::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::FatBorderChunkBase::createEmpty(), osg::DVRVolumeTextureBase::createEmpty(), osg::DVRVolumeBase::createEmpty(), 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::DistanceLODBase::createEmpty(), osg::DisplayCalibrationBase::createEmpty(), osg::DirectionalLightBase::createEmpty(), osg::DepthClearBackgroundBase::createEmpty(), osg::DepthChunkBase::createEmpty(), osg::CubeTextureChunkBase::createEmpty(), osg::ComponentTransformBase::createEmpty(), osg::ColorMaskChunkBase::createEmpty(), osg::ColorBufferViewportBase::createEmpty(), osg::ClusterWindowBase::createEmpty(), osg::ClipPlaneChunkBase::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::SwitchBase::shallowCopy(), osg::SurfaceBase::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::ShaderParameterMatrixBase::shallowCopy(), osg::ShaderParameterIntBase::shallowCopy(), osg::ShaderParameterBoolBase::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::OffCenterPerspectiveCameraBase::shallowCopy(), osg::MultiPassMaterialBase::shallowCopy(), osg::MultiDisplayWindowBase::shallowCopy(), osg::MatrixCameraDecoratorBase::shallowCopy(), osg::MatrixCameraBase::shallowCopy(), osg::MaterialPoolBase::shallowCopy(), osg::MaterialGroupBase::shallowCopy(), osg::MaterialChunkBase::shallowCopy(), osg::LineChunkBase::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::FatBorderChunkBase::shallowCopy(), osg::DVRVolumeTextureBase::shallowCopy(), osg::DVRVolumeBase::shallowCopy(), 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::DistanceLODBase::shallowCopy(), osg::DisplayCalibrationBase::shallowCopy(), osg::DirectionalLightBase::shallowCopy(), osg::DepthClearBackgroundBase::shallowCopy(), osg::DepthChunkBase::shallowCopy(), osg::CubeTextureChunkBase::shallowCopy(), osg::ComponentTransformBase::shallowCopy(), osg::ColorMaskChunkBase::shallowCopy(), osg::ColorBufferViewportBase::shallowCopy(), osg::ClusterWindowBase::shallowCopy(), osg::ClipPlaneChunkBase::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 {
002