About Store Forum Documentation Contact



Post Reply 
Out of range
Author Message
mystara Offline
Member

Post: #1
Out of range
Hi,

I keep getting the following error:
Element out of range
File: "../Installation/EsenthelEngine/Mesh/Mesh Base.h"
Line: 97

When running this code:

Code:
box.parts.New().base.create( Box(10), VTX_TEX0|VTX_NRM|VTX_TAN);  
if (box.parts.elms())
    box.parts[0].base.vtx.material(150);

I have checked in the debugger, and box.parts.elms() appears to have exactly one element, so I'm not sure why such an error would be thrown.
08-04-2012 09:05 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: Out of range
Code:
.vtx.material(150);
you're accessing vertex that doesn't exist
08-05-2012 02:10 PM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #3
RE: Out of range
Undoubtedly this is a stupid question...

But how can the vertex not exist? Surely all 3D objects must have vertices?
08-05-2012 05:01 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #4
RE: Out of range
150-th vertex doesn't exist
you can check amount of existing vertexes using "vtx.elms()"
08-05-2012 09:15 PM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #5
RE: Out of range
I.... LOL!

I thought that was changing the blend amount of all vertices. Haha!
Might I humbly suggest a documentation change to indicate that .material(int i) accesses the material of vertex i?

Some of us aren't as smart as you, Esenthel smile
08-05-2012 10:11 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
RE: Out of range
Thank you for the suggestion, it will be available in next SDK
08-05-2012 10:35 PM
Find all posts by this user Quote this message in a reply
Post Reply