Changeset 2294


Ignore:
Timestamp:
Jan 29, 2013, 1:32:27 PM (6 years ago)
Author:
touky
Message:

Added MeshViewer new project, its goal being to have a program capable of previewing a mesh from an outer source (.txt, js, etc ...) in order to speed up mesh creation.
Added RadialJitter("rj") to EasyMesh parser.

Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/build/vs2010/Lol.sln

    r2221 r2294  
    114114EndProject
    115115Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benlitzTest1", "..\..\people\benlitz\test1\benlitzTest1.vcxproj", "{FAF82AD2-D9F4-4694-9A01-103BC5B771B4}"
     116EndProject
     117Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MeshViewer", "..\..\test\MeshViewer.vcxproj", "{7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}"
    116118EndProject
    117119Global
     
    618620                {FAF82AD2-D9F4-4694-9A01-103BC5B771B4}.Release|x64.Build.0 = Release|x64
    619621                {FAF82AD2-D9F4-4694-9A01-103BC5B771B4}.Release|Xbox 360.ActiveCfg = Release|x64
     622                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Debug|Any CPU.ActiveCfg = Debug|x64
     623                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
     624                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Debug|Mixed Platforms.Build.0 = Debug|x64
     625                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Debug|PS3.ActiveCfg = Debug|x64
     626                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Debug|Win32.ActiveCfg = Debug|Win32
     627                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Debug|Win32.Build.0 = Debug|Win32
     628                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Debug|x64.ActiveCfg = Debug|x64
     629                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Debug|x64.Build.0 = Debug|x64
     630                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Debug|Xbox 360.ActiveCfg = Debug|x64
     631                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Release|Any CPU.ActiveCfg = Release|x64
     632                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Release|Mixed Platforms.ActiveCfg = Release|x64
     633                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Release|Mixed Platforms.Build.0 = Release|x64
     634                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Release|PS3.ActiveCfg = Release|x64
     635                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Release|Win32.ActiveCfg = Release|Win32
     636                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Release|Win32.Build.0 = Release|Win32
     637                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Release|x64.ActiveCfg = Release|x64
     638                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Release|x64.Build.0 = Release|x64
     639                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}.Release|Xbox 360.ActiveCfg = Release|x64
    620640        EndGlobalSection
    621641        GlobalSection(SolutionProperties) = preSolution
     
    639659                {80F81C11-8DA2-4990-91CB-9807783BA46E} = {E0491194-35E3-4513-9D31-608EA3165ECF}
    640660                {EE203B88-44CF-4859-9D42-7A1F43FECB52} = {E0491194-35E3-4513-9D31-608EA3165ECF}
     661                {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E} = {E0491194-35E3-4513-9D31-608EA3165ECF}
    641662                {B92ABADC-45BE-4CC5-B724-9426053123A1} = {E74CF679-CA2A-47E9-B1F4-3779D6AC6B04}
    642663                {7B083DA2-FE08-4F6D-BFDD-195D5C2783EB} = {E74CF679-CA2A-47E9-B1F4-3779D6AC6B04}
  • trunk/src/camera.cpp

    r2216 r2294  
    8888}
    8989
     90void Camera::ForceSceneUpdate()
     91{
     92    Scene::GetDefault()->SetViewMatrix(m_view_matrix);
     93    Scene::GetDefault()->SetProjMatrix(m_proj_matrix);
     94}
     95
    9096void Camera::TickGame(float seconds)
    9197{
     
    125131    WorldEntity::TickDraw(seconds);
    126132
    127     Scene::GetDefault()->SetViewMatrix(m_view_matrix);
    128     Scene::GetDefault()->SetProjMatrix(m_proj_matrix);
     133    ForceSceneUpdate();
    129134}
    130135
  • trunk/src/camera.h

    r2216 r2294  
    4141    mat4 const &GetViewMatrix();
    4242    mat4 const &GetProjMatrix();
     43    void ForceSceneUpdate();
    4344
    4445protected:
  • trunk/src/easymesh/easymesh-parser.y

    r2226 r2294  
    4848%token T_TRANSLATEY T_ROTATEY T_TAPERY T_SCALEY T_MIRRORY
    4949%token T_TRANSLATEZ T_ROTATEZ T_TAPERZ T_SCALEZ T_MIRRORZ
    50 %token T_TRANSLATE T_SCALE T_TOGGLESCALEWINDING
     50%token T_TRANSLATE T_SCALE T_TOGGLESCALEWINDING T_RADIALJITTER
    5151%token T_CSGUNION T_CSGSUBSTRACT T_CSGAND T_CSGXOR
    5252%token T_CHAMFER
     
    136136  | T_MIRRORY              { mc.m_mesh.MirrorY(); }
    137137  | T_MIRRORZ              { mc.m_mesh.MirrorZ(); }
     138  | T_RADIALJITTER args1   { mc.m_mesh.RadialJitter($2.f0); }
    138139  | T_TOGGLESCALEWINDING   { mc.m_mesh.ToggleScaleWinding(); }
    139140  | T_CSGUNION             { mc.m_mesh.CsgUnion(); }
  • trunk/src/easymesh/easymesh-scanner.l

    r2232 r2294  
    6767sz    { return token::T_SCALEZ; }
    6868s     { return token::T_SCALE; }
    69 tsw      { return token::T_TOGGLESCALEWINDING; }
     69tsw   { return token::T_TOGGLESCALEWINDING; }
    7070mx    { return token::T_MIRRORX; }
    7171my    { return token::T_MIRRORY; }
    7272mz    { return token::T_MIRRORZ; }
     73rj    { return token::T_RADIALJITTER; }
    7374
    7475csgu  { return token::T_CSGUNION; }
  • trunk/src/easymesh/easymesh.h

    r2289 r2294  
    106106                   float r2, float r12, float r22, float sidemul, int offset);
    107107
     108    //Convenience functions
     109public:
     110    int GetVertexCount() { return m_vert.Count(); }
     111    vec3 const &GetVertexLocation(int i) { return m_vert[i].m1; }
     112
    108113private:
    109114    vec4 m_color, m_color2;
  • trunk/test/Makefile.am

    r2205 r2294  
    1111EXTRA_DIST = data/gradient.png
    1212
    13 noinst_PROGRAMS = benchsuite $(testsuite) btphystest
     13noinst_PROGRAMS = benchsuite $(testsuite) btphystest MeshViewer
    1414
    1515TESTS = $(testsuite)
     
    5050btphystest_DEPENDENCIES = $(top_builddir)/src/liblol.a
    5151
     52MeshViewer_SOURCES = MeshViewer.cpp
     53MeshViewer_CPPFLAGS = @LOL_CFLAGS@
     54MeshViewer_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@
     55MeshViewer_DEPENDENCIES = $(top_builddir)/src/liblol.a
     56
Note: See TracChangeset for help on using the changeset viewer.