commit
2fd0a84c01
|
@ -620,7 +620,7 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
|
||||||
face.mIndices[i] = cur++;
|
face.mIndices[i] = cur++;
|
||||||
|
|
||||||
// copy vertex positions
|
// copy vertex positions
|
||||||
if ((vertices - mesh->mVertices) >= mesh->mNumVertices) {
|
if (static_cast<unsigned>(vertices - mesh->mVertices) >= mesh->mNumVertices) {
|
||||||
throw DeadlyImportError("AC3D: Invalid number of vertices");
|
throw DeadlyImportError("AC3D: Invalid number of vertices");
|
||||||
}
|
}
|
||||||
*vertices = object.vertices[entry.first] + object.translation;
|
*vertices = object.vertices[entry.first] + object.translation;
|
||||||
|
|
|
@ -39,14 +39,14 @@ BEGIN_ODDLPARSER_NS
|
||||||
static const char *Version = "0.1.0";
|
static const char *Version = "0.1.0";
|
||||||
|
|
||||||
namespace Grammar {
|
namespace Grammar {
|
||||||
static const char *OpenBracketToken = "{";
|
static const char * const OpenBracketToken = "{";
|
||||||
static const char *CloseBracketToken = "}";
|
static const char * const CloseBracketToken = "}";
|
||||||
static const char *OpenPropertyToken = "(";
|
static const char * const OpenPropertyToken = "(";
|
||||||
static const char *ClosePropertyToken = ")";
|
static const char * const ClosePropertyToken = ")";
|
||||||
static const char *BoolTrue = "true";
|
static const char * const BoolTrue = "true";
|
||||||
static const char *BoolFalse = "false";
|
static const char * const BoolFalse = "false";
|
||||||
static const char *RefToken = "ref";
|
static const char * const RefToken = "ref";
|
||||||
static const char *CommaSeparator = ",";
|
static const char * const CommaSeparator = ",";
|
||||||
|
|
||||||
static const char* PrimitiveTypeToken[ Value::ddl_types_max ] = {
|
static const char* PrimitiveTypeToken[ Value::ddl_types_max ] = {
|
||||||
"bool",
|
"bool",
|
||||||
|
|
|
@ -652,13 +652,6 @@ void Sweep::FlipEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* t,
|
||||||
Triangle& ot = t->NeighborAcross(p);
|
Triangle& ot = t->NeighborAcross(p);
|
||||||
Point& op = *ot.OppositePoint(*t, p);
|
Point& op = *ot.OppositePoint(*t, p);
|
||||||
|
|
||||||
if (&ot == NULL) {
|
|
||||||
// If we want to integrate the fillEdgeEvent do it here
|
|
||||||
// With current implementation we should never get here
|
|
||||||
//throw new RuntimeException( "[BUG:FIXME] FLIP failed due to missing triangle");
|
|
||||||
assert(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (InScanArea(p, *t->PointCCW(p), *t->PointCW(p), op)) {
|
if (InScanArea(p, *t->PointCCW(p), *t->PointCW(p), op)) {
|
||||||
// Lets rotate shared edge one vertex CW
|
// Lets rotate shared edge one vertex CW
|
||||||
RotateTrianglePair(*t, p, ot, op);
|
RotateTrianglePair(*t, p, ot, op);
|
||||||
|
@ -728,13 +721,6 @@ void Sweep::FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle&
|
||||||
Triangle& ot = t.NeighborAcross(p);
|
Triangle& ot = t.NeighborAcross(p);
|
||||||
Point& op = *ot.OppositePoint(t, p);
|
Point& op = *ot.OppositePoint(t, p);
|
||||||
|
|
||||||
if (&t.NeighborAcross(p) == NULL) {
|
|
||||||
// If we want to integrate the fillEdgeEvent do it here
|
|
||||||
// With current implementation we should never get here
|
|
||||||
//throw new RuntimeException( "[BUG:FIXME] FLIP failed due to missing triangle");
|
|
||||||
assert(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (InScanArea(eq, *flip_triangle.PointCCW(eq), *flip_triangle.PointCW(eq), op)) {
|
if (InScanArea(eq, *flip_triangle.PointCCW(eq), *flip_triangle.PointCW(eq), op)) {
|
||||||
// flip with new edge op->eq
|
// flip with new edge op->eq
|
||||||
FlipEdgeEvent(tcx, eq, op, &ot, op);
|
FlipEdgeEvent(tcx, eq, op, &ot, op);
|
||||||
|
|
|
@ -164,7 +164,7 @@ void SweepContext::RemoveFromMap(Triangle* triangle)
|
||||||
|
|
||||||
void SweepContext::MeshClean(Triangle& triangle)
|
void SweepContext::MeshClean(Triangle& triangle)
|
||||||
{
|
{
|
||||||
if (&triangle != NULL && !triangle.IsInterior()) {
|
if (!triangle.IsInterior()) {
|
||||||
triangle.IsInterior(true);
|
triangle.IsInterior(true);
|
||||||
triangles_.push_back(&triangle);
|
triangles_.push_back(&triangle);
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
|
|
Loading…
Reference in New Issue