m_indices32 member of index buffers

m_indices32 member of index buffers

Hi. I have a question about hkxIndexBuffer.

I need indices in 32-bit format, so I thought I would use the m_indices32 member of the hkxIndexBuffer class.

Whenever I load any of our models, I notice that m_indices32 is empty and only m_indices16 has data in it.
The number of indices in m_indices16 matches hkxIndexBuffer::m_length.

This is strange, because I thought loading the model from file would fill both hkArrays with indices.
Apparently this is not the case and only the 16-bit array is being filled. Is there an option in the exporter I need to use to make it use 32-bit indices? or do I have to manually convert the 16-bit indices into 32-bit?

Any help would be appreciated. Thanks!

2 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项
HavokNick的头像

Hey jbrindle,

The exporter fills the m_indices16 array by default unless
it has more than 2^16 indices, in which case it will fill the m_indices32
array. There is no option to change this default behavior.

That being said, hkxIndexBuffer has the function
getTrianglesIndices() which returns the indices of a triangle as 32-bit
unsigned integers, regardless of which array gets populated.

May I inquire as to why you need the indices specifically in
32-bit format?

-Nick

Nick S. Developer Support Engineer Havok www.havok.com

登陆并发表评论。