CSMPerspectiveCameraBase::CSMPerspectiveCameraBase(void) : Inherited(), _sfEyeSeparation (Real32(0.5f)), _sfZeroParallax (Real32(10.0f)), _sfHeadBeacon (NULL) { }
int main(int argc, char** argv) { try { const String NAMESPACE = "/ggg"; SimpleDeclContext context; CIMClass x(CIMName ("X")); x.addProperty(CIMProperty(CIMName ("one"), Uint32(111))); x.addProperty(CIMProperty(CIMName ("two"), Real32(222.222))); x.addProperty(CIMProperty(CIMName ("three"), String("Three"))); context.addClass(NAMESPACE, x); Resolver::resolveClass (x, &context, NAMESPACE); CIMClass y(CIMName ("Y"), CIMName ("X")); y.addProperty(CIMProperty(CIMName ("three"), String("Three - Three"))); y.addProperty(CIMProperty(CIMName ("four"), Boolean(false))); y.addProperty(CIMProperty(CIMName ("five"), Real32(555.555))); context.addClass(NAMESPACE, y); Resolver::resolveClass (y, &context, NAMESPACE); // y.print(); } catch (Exception& e) { cout << "Exception: " << e.getMessage() << endl; } cout << argv[0] << " +++++ passed all tests" << endl; return 0; }
void OffsetCameraDecorator::getProjection( Matrix &result, UInt32 width, UInt32 height) { if(width == 0 || height == 0) { result.setIdentity(); return; } CameraPtr camera = getDecoratee(); if(camera == NullFC) { FWARNING(("OffsetCameraDecorator::getProjection: no decoratee!\n")); result.setIdentity(); return; } if(getFullWidth() != 0) width = getFullWidth(); if(getFullHeight() != 0) height = getFullHeight(); camera->getProjection(result, width, height); Real32 x = getOffsetX() / Real32(width); Real32 y = getOffsetY() / Real32(height); Matrix sm( 1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, 0, 0, 0, 0, 1); result.multLeft(sm); }
ImageBase::ImageBase(void) : _mfParents (), _sfDimension (Int32(0)), _sfWidth (Int32(0)), _sfHeight (Int32(1)), _sfDepth (Int32(1)), _sfBpp (Int32(1)), _sfMipMapCount (Int32(1)), _sfFrameCount (Int32(1)), _sfFrameDelay (Time(0)), _sfPixelFormat (UInt32(0)), _mfPixel (), _sfFrameSize (Int32(0)), _sfName (), _sfDataType (Int32(GL_UNSIGNED_BYTE)), _sfComponentSize (Int32(1)), _sfSideCount (Int32(1)), _sfSideSize (Int32(0)), _sfForceCompressedData (bool(false)), _sfForceAlphaChannel (bool(false)), _sfForceColorChannel (bool(false)), _sfForceAlphaBinary (bool(false)), _sfResX (Real32(72.0f)), _sfResY (Real32(72.0f)), _sfResUnit (UInt16(2)), Inherited() { }
void Manipulator::mouseButtonPress(const UInt16 button, const Int16 x, const Int16 y ) { setLastMousePos(Pnt2f(Real32(x), Real32(y))); setActive(true); }
bool Navigator::calcFromTo(Int16 x, Int16 y, Real32& fromX, Real32& fromY, Real32& toX, Real32& toY) { Real32 width = Real32(_vp->getPixelWidth()); Real32 height = Real32(_vp->getPixelHeight()); if(width <= 0 || height <= 0) return false; Window *par = _vp->getParent(); Real32 winHeight; if(par != NULL) winHeight = Real32(par->getHeight()); else winHeight = height; fromX = (2.0f * (_lastX - _vp->getPixelLeft())- width) / width; fromY = (2.0f * (winHeight-_lastY-_vp->getPixelBottom())-height) / height; toX = (2.0f * (x - _vp->getPixelLeft()) - width) / width; toY = (2.0f * (winHeight - y - _vp->getPixelBottom()) - height) / height; return true; }
AnimChannelBase::AnimChannelBase(void) : Inherited(), _sfAnimation (NULL), _sfWeight (Real32(1.f)), _sfInValue (Real32(0.0)) { }
GaussianNormalDistribution2DBase::GaussianNormalDistribution2DBase(void) : Inherited(), _sfMean (Pnt2f(0.0,0.0)), _sfStandardDeviationX (Real32(1.0)), _sfStandardDeviationY (Real32(1.0)) { }
OrthographicCameraBase::OrthographicCameraBase(void) : Inherited(), _sfVerticalSize (), _sfHorizontalSize (Real32(-1)), _sfAspect (Real32(1)) { }
TerrainBase::TerrainBase(void) : _sfHeightData (), _sfHeightScale (Real32(1.0f)), _mfHeightError (), _mfHeightQuad (), _sfWidth (UInt32(0)), _sfLevel (UInt32(1)), _sfDetail (Real32(22.0f)), _sfBorderDetail (Int32(0)), _sfVertexSpacing (Real32(0.1f)), _sfHeightVertices (), _sfGeoMorphing (bool(false)), _sfBoundMin (), _sfBoundMax (), _sfEyePoint (), _sfEyeHeight (Real32(0.0f)), _sfEyePointValid (bool(false)), _sfOriginX (Real32(0.0f)), _sfOriginY (Real32(0.0f)), _sfOriginTexX (Real32(0.0f)), _sfOriginTexY (Real32(0.0f)), _sfTexSpacing (Real32(1.0f)), _sfTexYSpacing (Real32(1.0f)), _sfUpdateTerrain (bool(true)), _sfPerPixelLighting (bool(true)), Inherited() { }
SpotLightBase::SpotLightBase(void) : Inherited(), _sfDirection (Vec3f(0.f,0.f,1.f)), _sfSpotExponent (Real32(0.1f)), _sfSpotCutOff (Real32(1.0472f)) { }
float ImageHeightDataSource::getHeightSample( const Pnt2i& samplePos ) const { // todo: replace this with a higher level clip: if( samplePos[ 0 ] < 0 || samplePos[ 0 ] >= size_[ 0 ] || samplePos[ 1 ] < 0 || samplePos[ 1 ] >= size_[ 1 ] ) { return 0.0f; } // todo: replace this calulation with incremental addition int index = ( image_->getWidth() * samplePos[ 1 ] + samplePos[ 0 ] ); // todo: move this switch up higher.. (possibly into a template accessor??) switch( image_->getDataType() ) { default: case Image::OSG_INVALID_IMAGEDATATYPE: case Image::OSG_UINT8_IMAGEDATA: return ( ( UInt8* )image_->getData() )[ index ] / Real32( TypeTraits< UInt8 >::getMax() ); case Image::OSG_UINT16_IMAGEDATA: return ( ( UInt16* )image_->getData())[ index ] / Real32( TypeTraits< UInt16 >::getMax() ); case Image::OSG_UINT32_IMAGEDATA: return ( ( UInt32* )image_->getData() )[ index ] / Real32( TypeTraits< UInt32 >::getMax() ); case Image::OSG_FLOAT16_IMAGEDATA: return ( ( Real16* )image_->getData() )[ index ]; case Image::OSG_FLOAT32_IMAGEDATA: return ( ( Real32* )image_->getData() )[ index ]; }; return 0.0f; }
OffsetCameraDecoratorBase::OffsetCameraDecoratorBase(void) : _sfOffsetX (Real32(0)), _sfOffsetY (Real32(0)), _sfFullWidth (UInt32(0)), _sfFullHeight (UInt32(0)), Inherited() { }
ShaderShadowMapEngineBase::ShaderShadowMapEngineBase(void) : Inherited(), _sfShadowVertexProgram (NULL), _sfShadowFragmentProgram (NULL), _sfForceTextureUnit (Int32(-1)), _sfShadowNear (Real32(0.f)), _sfShadowFar (Real32(0.f)) { }
DepthChunkBase::DepthChunkBase(void) : Inherited(), _sfEnable (bool(true)), _sfFunc (GLenum(GL_LEQUAL)), _sfNear (Real32(-1.f)), _sfFar (Real32(-1.f)), _sfReadOnly (bool(false)) { }
FogChunkBase::FogChunkBase(void) : Inherited(), _sfMode (GLenum(GL_EXP)), _sfColor (Color4f(0.f, 0.f, 0.f, 0.f)), _sfStart (Real32(0.f)), _sfEnd (Real32(1.f)), _sfDensity (Real32(1.f)) { }
DVRIsoSurfaceBase::DVRIsoSurfaceBase(void) : _sfIsoValue (Real32(0.1)), _sfIsoThickness (Real32(0.1)), _sfIsoOpacity (Real32(0.5)), _sfAlphaMode (UInt32(GL_GREATER)), _sfSpecularLighting (bool(true)), Inherited() { }
TransformationInterfaceSensorBase::TransformationInterfaceSensorBase(void) : Inherited(), _sfTransformation (), _sfTranslation (), _sfRotation (), _sfRotationScale (Real32(1.f)), _sfTranslationScale (Real32(1.f)) { }
CollectiveGravityParticleSystemAffectorBase::CollectiveGravityParticleSystemAffectorBase(void) : Inherited(), _sfParticleMass (Real32(10000.0f)), _sfGravitationalConstant (Real32(0.0000000000667300)), _sfParticleMassSource (UInt32(CollectiveGravityParticleSystemAffector::MASS_STATIC)), _sfMinDistance (Real32(-1.0)), _sfMaxDistance (Real32(-1.0)) { }
AnimationBase::AnimationBase(void) : Inherited(), _sfCycling (Int32(-1)), _sfScale (Real32(1.0)), _sfOffset (Real32(0.0)), _sfSpan (Real32(-1.0)), _sfCycles (Real32(0)) { }
AgeFadeParticleAffectorBase::AgeFadeParticleAffectorBase(void) : Inherited(), _sfFadeInTime (Real32(1.0f)), _sfFadeOutTime (Real32(1.0f)), _sfFadeToAlpha (Real32(1.0f)), _sfStartAlpha (Real32(0.0f)), _sfEndAlpha (Real32(0.0f)) { }
LineUIDrawObjectBase::LineUIDrawObjectBase(void) : Inherited(), _sfTopLeft (Pnt2f(0,0)), _sfBottomRight (Pnt2f(0,0)), _sfWidth (Real32(1)), _sfColor (Color4f(1.0,1.0,1.0,1.0)), _sfOpacity (Real32(1.0)) { }
BillboardBase::BillboardBase(void) : Inherited(), _sfAxisOfRotation (Vec3f(0.f, 1.f, 0.f)), _sfFocusOnCamera (bool(true)), _sfAlignToScreen (bool(false)), _sfMinAngle (Real32(0.0f)), _sfMaxAngle (Real32(-1.0f)) { }
ShadowMapEngineBase::ShadowMapEngineBase(void) : Inherited(), _sfShadowTexChunk (NULL), _sfWidth (Int32(512)), _sfHeight (Int32(512)), _sfOffsetBias (Real32(4.f)), _sfOffsetFactor (Real32(10.f)), _sfShadowTravMask (UInt32(TypeTraits<UInt32>::BitsSet)) { }
TileCameraDecoratorBase::TileCameraDecoratorBase(void) : Inherited(), _sfLeft (Real32(0)), _sfRight (Real32(1)), _sfBottom (Real32(0)), _sfTop (Real32(1)), _sfFullWidth (UInt32(0)), _sfFullHeight (UInt32(0)) { }
FlowLayoutBase::FlowLayoutBase(void) : Inherited(), _sfOrientation (UInt32(FlowLayout::HORIZONTAL_ORIENTATION)), _sfHorizontalGap (Real32(10)), _sfVerticalGap (Real32(10)), _sfMajorAxisAlignment (Real32(0.5f)), _sfMinorAxisAlignment (Real32(0.5f)), _sfComponentAlignment (Real32(0.5f)) { }
SimpleCudaComputeAlgorithmBase::SimpleCudaComputeAlgorithmBase(void) : Inherited(), _sfMode (UInt32((SimpleCudaComputeAlgorithm::UpdateOSG))), _sfIntensity (Real32(0.02f)), _sfScale (Real32(4.5f)), _sfScaleStep (Real32(0.1f)), _sfScaleMax (Real32(50.f)), _sfTarget (NULL) { }
HDRStageBase::HDRStageBase(void) : Inherited(), _sfExposure (Real32(8.f)), _sfBlurWidth (Real32(3.0f)), _sfBlurAmount (Real32(0.5f)), _sfEffectAmount (Real32(0.2f)), _sfGamma (Real32(0.5f)), _sfBufferFormat (GLenum(GL_RGBA16F_ARB)) { }
AnimationGroupBase::AnimationGroupBase(void) : _Producer(&getProducerType()), Inherited(), _mfAnimations (), _sfScale (Real32(1.0)), _sfOffset (Real32(0.0)), _sfSpan (Real32(-1.0)) ,_sfEventProducer(&_Producer) { }
SimpleStageBase::SimpleStageBase(void) : Inherited(), _sfLeft (Real32(0.f)), _sfRight (Real32(1.f)), _sfBottom (Real32(0.f)), _sfTop (Real32(1.f)), _sfCamera (NULL), _sfBackground (NULL) { }