本文整理汇总了C++中InStream::Read方法的典型用法代码示例。如果您正苦于以下问题:C++ InStream::Read方法的具体用法?C++ InStream::Read怎么用?C++ InStream::Read使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InStream
的用法示例。
在下文中一共展示了InStream::Read方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
//----------------------------------------------------------------------------
void UIAnimPicBox::Load (InStream& source)
{
PX2_BEGIN_DEBUG_STREAM_LOAD(source);
UIPicBox::Load(source);
source.ReadPointer(mAPBCtrl);
source.ReadString(mFrameTexPack);
source.Read(mIntervalTime);
int numAnim = 0;
source.Read(numAnim);
mElements.resize(numAnim);
for (int i=0; i<numAnim; i++)
{
source.Read(mElements[i].Index);
source.ReadAggregate(mElements[i].UV0);
source.ReadAggregate(mElements[i].UV1);
source.ReadAggregate(mElements[i].UV2);
source.ReadAggregate(mElements[i].UV3);
source.ReadPointer(mElements[i].Tex);
}
PX2_END_DEBUG_STREAM_LOAD(UIAnimPicBox, source);
}
示例2: Load
//----------------------------------------------------------------------------
void Jungler::Load (InStream& source)
{
PX2_BEGIN_DEBUG_STREAM_LOAD(source);
TriMesh::Load(source);
PX2_VERSION_LOAD(source);
source.ReadEnum(mJunglerType);
source.Read(mMaxNum);
source.ReadPointer(mMtlInst);
source.ReadPointer(mTexture);
int num = 0;
source.Read(num);
if (num > 0)
{
mPoses.resize(num);
mNormals.resize(num);
mWidths.resize(num);
mHeights.resize(num);
source.ReadAggregateVV(num, &mPoses[0]);
source.ReadAggregateVV(num, &mNormals[0]);
source.ReadVV(num, &mWidths[0]);
source.ReadVV(num, &mHeights[0]);
}
PX2_END_DEBUG_STREAM_LOAD(Jungler, source);
}
示例3: Load
//----------------------------------------------------------------------------
void RawTerrainPage::Load (InStream& source)
{
PX2_BEGIN_DEBUG_STREAM_LOAD(source);
TriMesh::Load(source);
source.Read(mSize);
int numVertices = mSize*mSize;
source.ReadVR(numVertices, mHeights);
source.ReadAggregate(mOrigin);
source.Read(mSpacing);
mSizeM1 = mSize - 1;
mInvSpacing = 1.0f/mSpacing;
source.ReadPointer(mMaterialInstance);
source.ReadPointer(mTextureDefault);
source.ReadPointer(mTexture0);
source.ReadPointer(mTextureAlpha);
source.ReadPointer(mTexture1);
source.ReadPointer(mTexture2);
source.ReadPointer(mTexture3);
source.ReadPointer(mTexture4);
source.ReadAggregate(mUV01);
source.ReadAggregate(mUV23);
source.ReadAggregate(mUV4);
source.ReadPointer(mUV01Float);
source.ReadPointer(mUV23Float);
source.ReadPointer(mUV4Float);
PX2_END_DEBUG_STREAM_LOAD(RawTerrainPage, source);
}
示例4: Load
//----------------------------------------------------------------------------
void CurveMesh::Load (InStream& source)
{
PX2_BEGIN_DEBUG_STREAM_LOAD(source);
Polysegment::Load(source);
PX2_VERSION_LOAD(source);
source.Read(mNumFullVertices);
source.Read(mNumSegments);
source.Read(mLevel);
source.ReadBool(mAllowDynamicChange);
source.ReadPointer(mOrigVBuffer);
source.ReadPointer(mOrigParams);
bool locked = (mOrigVBuffer == 0);
if (!locked)
{
source.ReadPointerVR(mNumSegments, mSegments);
}
if (mAllowDynamicChange)
{
mCInfo = new1<CurveInfo>(mNumFullVertices);
for (int i = 0; i < mNumFullVertices; ++i)
{
source.ReadPointer(mCInfo[i].Segment);
source.Read(mCInfo[i].Param);
}
}
PX2_END_DEBUG_STREAM_LOAD(CurveMesh, source);
}
示例5: Load
//----------------------------------------------------------------------------
void TerrainPage::Load (InStream& source)
{
PX2_BEGIN_DEBUG_STREAM_LOAD(source);
TriMesh::Load(source);
PX2_VERSION_LOAD(source);
source.Read(mSize);
int numVertices = mSize*mSize;
source.ReadVR(numVertices, mHeights);
source.ReadAggregate(mOrigin);
source.Read(mSpacing);
mSizeM1 = mSize - 1;
mInvSpacing = 1.0f/mSpacing;
int numJunglers = 0;
source.Read(numJunglers);
if (numJunglers > 0)
{
mJunglers.resize(numJunglers);
source.ReadPointerVV(numJunglers, &mJunglers[0]);
}
PX2_END_DEBUG_STREAM_LOAD(TerrainPage, source);
}
示例6: Load
//----------------------------------------------------------------------------
void RawTerrain::Load (InStream& source)
{
PX2_BEGIN_DEBUG_STREAM_LOAD(source);
Node::Load(source);
source.ReadEnum(mMode);
source.Read(mNumRows);
source.Read(mNumCols);
source.Read(mSize);
source.Read(mMinElevation);
source.Read(mMaxElevation);
source.Read(mSpacing);
source.Read(mCameraRow);
source.Read(mCameraCol);
source.ReadPointer(mVFormat);
source.ReadPointer(mCamera);
source.ReadPointer(mShine);
mPages = new2<RawTerrainPagePtr>(mNumCols, mNumRows);
for (int row = 0; row < mNumRows; ++row)
{
for (int col = 0; col < mNumCols; ++col)
{
source.ReadPointer(mPages[row][col]);
}
}
PX2_END_DEBUG_STREAM_LOAD(RawTerrain, source);
}
示例7: LoadTGA
bool LoadTGA( InStream& is, ColorSurface& image )
{
BYTE header[18];
is.Read( header, 18 );
if (header[1] != 0 ||
(header[2] != 2 && header[2] != 3))
{
return false;
}
int width = header[0 + 12] + header[1 + 12]*256;
int height = header[2 + 12] + header[3 + 12]*256;
int bitspp = header[4 + 12];
image.SetExt( width, height );
int bytespp = 0;
if (bitspp == 32)
{
bytespp = 4;
}
else if (bitspp == 24)
{
bytespp = 3;
}
else
{
return false;
}
int nPix = width*height;
int nBytes = nPix*bytespp;
Buffer buf( nBytes );
if (!is.Read( buf.GetData(), nBytes ))
{
return false;
}
const BYTE* pPix = buf.GetData();
for (int j = height - 1; j >= 0; j--)
{
for (int i = 0; i < width; i++)
{
BYTE alpha = 255;
if (bytespp == 4)
{
alpha = pPix[3];
}
image.SetColor( i, j, ColorF( alpha, pPix[2], pPix[1], pPix[0] ) );
pPix += bytespp;
}
}
return true;
}
示例8: Load
//----------------------------------------------------------------------------
void UISizeExtendControl::Load(InStream& source)
{
PX2_BEGIN_DEBUG_STREAM_LOAD(source);
Controller::Load(source);
PX2_VERSION_LOAD(source);
source.Read(mWidthOverHeightPercent);
source.Read(mOriginHeight);
PX2_END_DEBUG_STREAM_LOAD(Controller, source);
}
示例9: Load
//----------------------------------------------------------------------------
void Particles::Load (InStream& source)
{
WM5_BEGIN_DEBUG_STREAM_LOAD(source);
TriMesh::Load(source);
source.ReadRR(mNumParticles, mPositionSizes);
source.Read(mSizeAdjust);
source.Read(mNumActive);
WM5_END_DEBUG_STREAM_LOAD(Particles, source);
}
示例10: Load
//----------------------------------------------------------------------------
void GroupBuf::Load (InStream& source)
{
PX2_BEGIN_DEBUG_STREAM_LOAD(source);
Buf::Load(source);
PX2_VERSION_LOAD(source);
source.Read(mToGroupCharacterID);
source.Read(mBeforeGroup);
PX2_END_DEBUG_STREAM_LOAD(GroupBuf, source);
}
示例11: Load
//----------------------------------------------------------------------------
void ClodMesh::Load (InStream& source)
{
PX2_BEGIN_DEBUG_STREAM_LOAD(source);
TriMesh::Load(source);
PX2_VERSION_LOAD(source);
source.Read(mCurrentRecord);
source.Read(mTargetRecord);
source.ReadPointer(mRecordArray);
PX2_END_DEBUG_STREAM_LOAD(ClodMesh, source);
}
示例12: Load
//----------------------------------------------------------------------------
void OffsetProperty::Load (InStream& source)
{
PX2_BEGIN_DEBUG_STREAM_LOAD(source);
Object::Load(source);
source.ReadBool(FillEnabled);
source.ReadBool(LineEnabled);
source.ReadBool(PointEnabled);
source.Read(Scale);
source.Read(Bias);
PX2_END_DEBUG_STREAM_LOAD(OffsetProperty, source);
}
示例13: Load
//----------------------------------------------------------------------------
void PushTransformController::Load (InStream& source)
{
PX2_BEGIN_DEBUG_STREAM_LOAD(source);
Controller::Load(source);
PX2_VERSION_LOAD(source);
source.ReadEnum(mTransType);
source.Read(mMaxVelocity);
source.Read(mFriction);
source.ReadAggregate(mVelocity);
PX2_END_DEBUG_STREAM_LOAD(PushTransformController, source);
}
示例14: Load
//----------------------------------------------------------------------------
void SurfacePatch::Load (InStream& source)
{
WM5_BEGIN_DEBUG_STREAM_LOAD(source);
Object::Load(source);
source.Read(mUMin);
source.Read(mUMax);
source.Read(mVMin);
source.Read(mVMax);
source.ReadBool(mRectangular);
WM5_END_DEBUG_STREAM_LOAD(SurfacePatch, source);
}
示例15: Load
//----------------------------------------------------------------------------
void OffsetState::Load (InStream& source)
{
WM5_BEGIN_DEBUG_STREAM_LOAD(source);
Object::Load(source);
source.ReadBool(FillEnabled);
source.ReadBool(LineEnabled);
source.ReadBool(PointEnabled);
source.Read(Scale);
source.Read(Bias);
WM5_END_DEBUG_STREAM_LOAD(OffsetState, source);
}