本文整理汇总了C++中Real32函数的典型用法代码示例。如果您正苦于以下问题:C++ Real32函数的具体用法?C++ Real32怎么用?C++ Real32使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Real32函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Inherited
CSMPerspectiveCameraBase::CSMPerspectiveCameraBase(void) :
Inherited(),
_sfEyeSeparation (Real32(0.5f)),
_sfZeroParallax (Real32(10.0f)),
_sfHeadBeacon (NULL)
{
}
示例2: main
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;
}
示例3: getDecoratee
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);
}
示例4: _sfForceCompressedData
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()
{
}
示例5: setLastMousePos
void Manipulator::mouseButtonPress(const UInt16 button,
const Int16 x,
const Int16 y )
{
setLastMousePos(Pnt2f(Real32(x), Real32(y)));
setActive(true);
}
示例6: Real32
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;
}
示例7: Inherited
AnimChannelBase::AnimChannelBase(void) :
Inherited(),
_sfAnimation (NULL),
_sfWeight (Real32(1.f)),
_sfInValue (Real32(0.0))
{
}
示例8: Inherited
GaussianNormalDistribution2DBase::GaussianNormalDistribution2DBase(void) :
Inherited(),
_sfMean (Pnt2f(0.0,0.0)),
_sfStandardDeviationX (Real32(1.0)),
_sfStandardDeviationY (Real32(1.0))
{
}
示例9: Inherited
OrthographicCameraBase::OrthographicCameraBase(void) :
Inherited(),
_sfVerticalSize (),
_sfHorizontalSize (Real32(-1)),
_sfAspect (Real32(1))
{
}
示例10: switch
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;
}
示例11: Inherited
OffsetCameraDecoratorBase::OffsetCameraDecoratorBase(void) :
_sfOffsetX (Real32(0)),
_sfOffsetY (Real32(0)),
_sfFullWidth (UInt32(0)),
_sfFullHeight (UInt32(0)),
Inherited()
{
}
示例12: Inherited
ShaderShadowMapEngineBase::ShaderShadowMapEngineBase(void) :
Inherited(),
_sfShadowVertexProgram (NULL),
_sfShadowFragmentProgram (NULL),
_sfForceTextureUnit (Int32(-1)),
_sfShadowNear (Real32(0.f)),
_sfShadowFar (Real32(0.f))
{
}
示例13: Inherited
DepthChunkBase::DepthChunkBase(void) :
Inherited(),
_sfEnable (bool(true)),
_sfFunc (GLenum(GL_LEQUAL)),
_sfNear (Real32(-1.f)),
_sfFar (Real32(-1.f)),
_sfReadOnly (bool(false))
{
}
示例14: Inherited
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))
{
}
示例15: Inherited
DVRIsoSurfaceBase::DVRIsoSurfaceBase(void) :
_sfIsoValue (Real32(0.1)),
_sfIsoThickness (Real32(0.1)),
_sfIsoOpacity (Real32(0.5)),
_sfAlphaMode (UInt32(GL_GREATER)),
_sfSpecularLighting (bool(true)),
Inherited()
{
}