本文整理汇总了C++中DynamicArray::GetData方法的典型用法代码示例。如果您正苦于以下问题:C++ DynamicArray::GetData方法的具体用法?C++ DynamicArray::GetData怎么用?C++ DynamicArray::GetData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DynamicArray
的用法示例。
在下文中一共展示了DynamicArray::GetData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadCacheObjectFromBuffer
Reflect::ObjectPtr Helium::Cache::ReadCacheObjectFromBuffer( const DynamicArray< uint8_t > &_buffer )
{
if (_buffer.GetSize() == 0)
{
Reflect::ObjectPtr null_object;
return null_object;
}
return ReadCacheObjectFromBuffer(_buffer.GetData(), 0, _buffer.GetSize());
}
示例2: _tWinMain
//.........这里部分代码省略.........
Helium::StrongPtr<Helium::Texture2d> texture;
gAssetLoader->LoadObject( AssetPath( TXT( "/Textures:Triangle.png" ) ), texture);
Helium::RTexture2d *rTexture2d = texture->GetRenderResource2d();
while( windowData.bProcessMessages )
{
#if GRAPHICS_SCENE_BUFFERED_DRAWER
BufferedDrawer& rSceneDrawer = pGraphicsScene->GetSceneBufferedDrawer();
rSceneDrawer.DrawScreenText(
20,
20,
String( TXT( "RUNNING" ) ),
Color( 0xffffffff ),
RenderResourceManager::DEBUG_FONT_SIZE_LARGE );
rSceneDrawer.DrawScreenText(
21,
20,
String( TXT( "RUNNING" ) ),
Color( 0xffffffff ),
RenderResourceManager::DEBUG_FONT_SIZE_LARGE );
time += 0.01f;
DynamicArray<SimpleVertex> verticesU;
verticesU.New( -100.0f, -100.0f, 750.0f );
verticesU.New( 100.0f, -100.0f, 750.0f );
verticesU.New( 100.0f, 100.0f, 750.0f );
verticesU.New( -100.0f, 100.0f, 750.0f );
rSceneDrawer.DrawLineList( verticesU.GetData(), static_cast<uint32_t>( verticesU.GetSize() ) );
DynamicArray<SimpleTexturedVertex> verticesT;
verticesT.New( Simd::Vector3( -100.0f, 100.0f, 750.0f ), Simd::Vector2( 0.0f, 0.0f ) );
verticesT.New( Simd::Vector3( 100.0f, 100.0f, 750.0f ), Simd::Vector2( 1.0f, 0.0f ) );
verticesT.New( Simd::Vector3( -100.0f, -100.0f, 750.0f ), Simd::Vector2( 0.0f, 1.0f ) );
verticesT.New( Simd::Vector3( 100.0f, -100.0f, 750.0f ), Simd::Vector2( 1.0f, 1.0f ) );
//rSceneDrawer.DrawTextured(
// RENDERER_PRIMITIVE_TYPE_TRIANGLE_STRIP,
// verticesT.GetData(),
// verticesT.GetSize(),
// NULL,
// 2,
// rTexture2d, Helium::Color(1.0f, 1.0f, 1.0f, 1.0f), Helium::RenderResourceManager::RASTERIZER_STATE_DEFAULT, Helium::RenderResourceManager::DEPTH_STENCIL_STATE_NONE);
//rSceneDrawer.DrawTexturedQuad(rTexture2d);
Helium::Simd::Matrix44 transform = Helium::Simd::Matrix44::IDENTITY;
Simd::Vector3 location(0.0f, 400.0f, 0.0f);
Simd::Quat rotation(Helium::Simd::Vector3::BasisZ, time);
Simd::Vector3 scale(1000.0f, 1000.0f, 1000.0f);
transform.SetRotationTranslationScaling(rotation, location, scale);
rSceneDrawer.DrawTexturedQuad(rTexture2d, transform, Simd::Vector2(0.0f, 0.0f), Simd::Vector2(0.5f, 0.5f));
#endif
//Helium::Simd::Vector3 up = Simd::Vector3::BasisY;
////Helium::Simd::Vector3 eye(5000.0f * sin(time), 0.0f, 5000.0f * cos(time));