Changeset 2294 for trunk/src


Ignore:
Timestamp:
Jan 29, 2013, 1:32:27 PM (8 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/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.