本文整理汇总了C++中CDataReader::readInt16方法的典型用法代码示例。如果您正苦于以下问题:C++ CDataReader::readInt16方法的具体用法?C++ CDataReader::readInt16怎么用?C++ CDataReader::readInt16使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDataReader
的用法示例。
在下文中一共展示了CDataReader::readInt16方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getCOLVersion
void CCOLEntry::parseCollisionMeshVertices(void)
{
CDataReader *pDataReader = CDataReader::getInstance();
eCOLVersion eCOLVersionValue = getCOLVersion() == nullptr ? COL_UNKNOWN : getCOLVersion()->getVersionId();
vector<TVertex>& vecVertices = getCollisionMeshVertices();
for (uint32 i = 0, j = getCollisionMeshVertexCount(); i < j; i++)
{
char szText1[500];
TVertex vertex;
if (eCOLVersionValue == COL_1)
{
vertex.m_x = pDataReader->readFloat32();
vertex.m_y = pDataReader->readFloat32();
vertex.m_z = pDataReader->readFloat32();
}
else
{
vertex.m_x = ((float32) pDataReader->readInt16()) / 128.0f;
vertex.m_y = ((float32) pDataReader->readInt16()) / 128.0f;
vertex.m_z = ((float32) pDataReader->readInt16()) / 128.0f;
}
vecVertices.push_back(vertex);
}
}
示例2: getShadowMeshVertices
void CCOLEntry::parseShadowMeshVertices(void)
{
CDataReader *pDataReader = CDataReader::getInstance();
vector<TVertex>& vecVertices = getShadowMeshVertices();
for (uint32 i = 0, j = getShadowMeshVertexCount(); i < j; i++)
{
TVertex vertex;
vertex.m_x = ((float32) pDataReader->readInt16()) / 128.0f;
vertex.m_y = ((float32) pDataReader->readInt16()) / 128.0f;
vertex.m_z = ((float32) pDataReader->readInt16()) / 128.0f;
vecVertices.push_back(vertex);
}
}