Again I had to modify things like mesh->FaceSet().begin();
to &mesh->FaceSet()[0]; mein@cs.umn.edu
This commit is contained in:
@@ -70,7 +70,7 @@ BSP_CSGMesh_VertexIt_Done(
|
||||
// assume CSG_IteratorPtr is of the correct type.
|
||||
BSP_CSGMesh_VertexIt * vertex_it = (BSP_CSGMesh_VertexIt *)it;
|
||||
|
||||
if (vertex_it->pos < vertex_it->mesh->VertexSet().end()) return 0;
|
||||
if (vertex_it->pos < &(*vertex_it->mesh->VertexSet().end())) return 0;
|
||||
return 1;
|
||||
};
|
||||
|
||||
@@ -104,7 +104,7 @@ BSP_CSGMesh_VertexIt_Reset(
|
||||
) {
|
||||
// assume CSG_IteratorPtr is of the correct type.
|
||||
BSP_CSGMesh_VertexIt * vertex_it = (BSP_CSGMesh_VertexIt *)it;
|
||||
vertex_it->pos = vertex_it->mesh->VertexSet().begin();
|
||||
vertex_it->pos = &vertex_it->mesh->VertexSet()[0];
|
||||
};
|
||||
|
||||
static
|
||||
@@ -123,7 +123,7 @@ BSP_CSGMeshVertexIt_Construct(
|
||||
|
||||
BSP_CSGMesh_VertexIt * v_it = new BSP_CSGMesh_VertexIt;
|
||||
v_it->mesh = mesh;
|
||||
v_it->pos = mesh->VertexSet().begin();
|
||||
v_it->pos = &mesh->VertexSet()[0];
|
||||
output->it = v_it;
|
||||
};
|
||||
|
||||
@@ -162,7 +162,7 @@ BSP_CSGMesh_FaceIt_Done(
|
||||
// assume CSG_IteratorPtr is of the correct type.
|
||||
BSP_CSGMesh_FaceIt * face_it = (BSP_CSGMesh_FaceIt *)it;
|
||||
|
||||
if (face_it->pos < face_it->mesh->FaceSet().end()) {
|
||||
if (face_it->pos < &(*face_it->mesh->FaceSet().end())) {
|
||||
if (face_it->face_triangle + 3 <= face_it->pos->m_verts.size()) {
|
||||
return 0;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ BSP_CSGMesh_FaceIt_Fill(
|
||||
// time to change the iterator type to an integer...
|
||||
face_it->mesh->FaceData().Copy(
|
||||
face->user_face_data,
|
||||
int(face_it->pos - face_it->mesh->FaceSet().begin())
|
||||
int(face_it->pos - &face_it->mesh->FaceSet()[0])
|
||||
);
|
||||
|
||||
// Copy face vertex data across...
|
||||
@@ -223,7 +223,7 @@ BSP_CSGMesh_FaceIt_Step(
|
||||
BSP_CSGMesh_FaceIt * face_it = (BSP_CSGMesh_FaceIt *)it;
|
||||
|
||||
// safety guard
|
||||
if (face_it->pos < face_it->mesh->FaceSet().end()) {
|
||||
if (face_it->pos < &(*face_it->mesh->FaceSet().end())) {
|
||||
|
||||
if (face_it->face_triangle + 3 < face_it->pos->m_verts.size()) {
|
||||
(face_it->face_triangle)++;
|
||||
@@ -241,7 +241,7 @@ BSP_CSGMesh_FaceIt_Reset(
|
||||
) {
|
||||
// assume CSG_IteratorPtr is of the correct type.
|
||||
BSP_CSGMesh_FaceIt * f_it = (BSP_CSGMesh_FaceIt *)it;
|
||||
f_it->pos = f_it->mesh->FaceSet().begin();
|
||||
f_it->pos = &f_it->mesh->FaceSet()[0];
|
||||
f_it->face_triangle = 0;
|
||||
};
|
||||
|
||||
@@ -261,7 +261,7 @@ BSP_CSGMesh_FaceIt_Construct(
|
||||
|
||||
BSP_CSGMesh_FaceIt * f_it = new BSP_CSGMesh_FaceIt;
|
||||
f_it->mesh = mesh;
|
||||
f_it->pos = mesh->FaceSet().begin();
|
||||
f_it->pos = &mesh->FaceSet()[0];
|
||||
f_it->face_triangle = 0;
|
||||
|
||||
output->it = f_it;
|
||||
|
@@ -62,7 +62,7 @@ Duplicate(
|
||||
int output = Size();
|
||||
IncSize();
|
||||
|
||||
memcpy(m_data.end() - m_width,record,m_width);
|
||||
memcpy(&m_data[ m_data.size() - 1 - m_width ], record, m_width);
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -77,7 +77,8 @@ Duplicate(
|
||||
if (m_width) {
|
||||
int output = Size();
|
||||
IncSize();
|
||||
memcpy(m_data.end() - m_width,m_data.begin() + record_index * m_width,m_width);
|
||||
memcpy(&m_data[ m_data.size() - 1 - m_width ],
|
||||
&m_data[ record_index * m_width], m_width);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +90,7 @@ Copy(
|
||||
int pos
|
||||
){
|
||||
if (m_width) {
|
||||
memcpy(output,m_data.begin() + m_width*pos,m_width);
|
||||
memcpy(output, &m_data[m_width*pos],m_width);
|
||||
}
|
||||
}
|
||||
void
|
||||
@@ -128,6 +129,6 @@ BSP_CSGUserData::
|
||||
operator [] (
|
||||
const int pos
|
||||
){
|
||||
return m_data.begin() + m_width*pos;
|
||||
return &m_data[ m_width*pos ];
|
||||
}
|
||||
|
||||
|
@@ -214,7 +214,7 @@ Process(
|
||||
/* Try and snip this triangle off from the
|
||||
current polygon.*/
|
||||
|
||||
if ( Snip(verts,contour,u,v,w,nv,m_V.begin()) )
|
||||
if ( Snip(verts,contour,u,v,w,nv, &m_V[0]) )
|
||||
{
|
||||
int a,b,c,s,t;
|
||||
|
||||
|
Reference in New Issue
Block a user