Kaynağa Gözat

easymesh: print full mesh source when compilation fails.

legacy
Sam Hocevar sam 11 yıl önce
ebeveyn
işleme
9cfe1bffd6
2 değiştirilmiş dosya ile 17 ekleme ve 14 silme
  1. +3
    -0
      src/easymesh/easymesh-compiler.cpp
  2. +14
    -14
      test/physicobject.h

+ 3
- 0
src/easymesh/easymesh-compiler.cpp Dosyayı Görüntüle

@@ -33,7 +33,10 @@ bool EasyMeshCompiler::ParseString(char const *command)
m_lexer = &scanner;
EasyMeshParser parser(*this);
if (parser.parse() != 0)
{
Log::Debug("Mesh source: %s\n", command);
return false;
}
return true;
}



+ 14
- 14
test/physicobject.h Dosyayı Görüntüle

@@ -28,7 +28,7 @@ public:
{
m_physics = new EasyPhysic(this);

m_mesh.Compile("[sc#ddd afcb60 1 60 -.1]");
m_mesh.Compile("[sc#ddd afcb 60 1 60 -.1]");
vec3 BoxSize = vec3(60.f, 1.f, 60.f);
m_physics->SetCollisionChannel(0, 0xFF);
m_physics->SetShapeToBox(BoxSize);
@@ -45,7 +45,7 @@ public:
{
m_physics = new EasyPhysic(this);

m_mesh.Compile("[sc#ddd afcb20 1 20 -.1]");
m_mesh.Compile("[sc#ddd afcb 20 1 20 -.1]");
vec3 BoxSize = vec3(20.f, 1.f, 20.f);
m_physics->SetCollisionChannel(0, 0xFF);
m_physics->SetShapeToBox(BoxSize);
@@ -63,12 +63,12 @@ public:
"[sc#000 scb#000"
//"[sc#aaa scb#aaa"
"[ad8 2 0 rx180 ty-1]"
"[asph8 .5 .5 .5 ty1]"
"[asph8 .5 ty1]"
"[ac32 2 .5 .5 0 0]"
"[asph6 .1 .1 .1 ty.9 tx.5 tz.15]"
"[asph6 .1 .1 .1 ty.9 tx.5 tz-.15]"
"[asph8 .05 .5 .05 ty.6 tz.5]"
"[asph8 .05 .5 .05 ty.6 tz-.5]"
"[asph6 .1 ty.9 tx.5 tz.15]"
"[asph6 .1 ty.9 tx.5 tz-.15]"
"[asph8 .05 sy10 ty.6 tz.5]"
"[asph8 .05 sy10 ty.6 tz-.5]"
"]"
"[sc#fd0 scb#fd0"
"[ac8 .4 .1 0 0 0 ty.25 rz-90 ty.7 tx.5]"
@@ -76,7 +76,7 @@ public:
"["
"[sc#fff scb#fff"
"[ad8 2 0 rx180 ty-1]"
"[asph8 .5 .5 .5 ty1]"
"[asph8 .5 ty1]"
"[ac32 1.9 .5 .5 0 0]"
"]"
" ty-.1 tx.05]"
@@ -119,12 +119,12 @@ public:

int SphereLimit = MeshRand.Count();

MeshRand << "[sc#add asph1 2 2 2]";
MeshRand << "[sc#dad asph1 2 2 2]";
MeshRand << "[sc#dda asph1 2 2 2]";
MeshRand << "[sc#daa asph1 2 2 2]";
MeshRand << "[sc#ada asph1 2 2 2]";
MeshRand << "[sc#aad asph1 2 2 2]";
MeshRand << "[sc#add asph1 2]";
MeshRand << "[sc#dad asph1 2]";
MeshRand << "[sc#dda asph1 2]";
MeshRand << "[sc#daa asph1 2]";
MeshRand << "[sc#ada asph1 2]";
MeshRand << "[sc#aad asph1 2]";

int ConeLimit = MeshRand.Count();



Yükleniyor…
İptal
Kaydet