Ignore:
Timestamp:
Jan 17, 2013, 9:49:29 PM (7 years ago)
Author:
touky
Message:

Added CSG v0.001a : not optimized, too much operation makes it slow. triangle count is not optimized.
Useage : "...[.... csg*]" equals "current mesh -CSG- the mesh in the braces".
Keywords : CsgUnion<csgu>, CsgSubstract<csgs>, CsgAnd<csga>, CsgXor<csgx>
TODO : cleanup useless code.
TODO : Some bugs are still present, some face that disappear should not.
TODO : Correct epsilon useage (see geometry files).
TODO : Coplanar face are not handled -at all-.
TODO : Vertex count goes through the roof in case of a Xor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/generated/easymesh-parser.h

    r2152 r2226  
    1 /* A Bison parser, made by GNU Bison 2.5.  */
     1/* A Bison parser, made by GNU Bison 2.4.2.  */
    22
    33/* Skeleton interface for Bison LALR(1) parsers in C++
    44   
    5       Copyright (C) 2002-2011 Free Software Foundation, Inc.
     5      Copyright (C) 2002-2010 Free Software Foundation, Inc.
    66   
    77   This program is free software: you can redistribute it and/or modify
     
    4141#include <iostream>
    4242#include "stack.hh"
     43
     44
     45namespace lol {
     46
     47/* Line 34 of lalr1.cc  */
     48#line 49 "generated/easymesh-parser.h"
     49  class position;
     50  class location;
     51
     52} // lol
     53
     54/* Line 34 of lalr1.cc  */
     55#line 56 "generated/easymesh-parser.h"
     56
    4357#include "location.hh"
    4458
     
    6175#endif
    6276
     77/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
     78   If N is 0, then set CURRENT to the empty location which ends
     79   the previous symbol: RHS[0] (always defined).  */
     80
     81#ifndef YYLLOC_DEFAULT
     82# define YYLLOC_DEFAULT(Current, Rhs, N)                \
     83do {                                                    \
     84  if (N)                                                \
     85    {                                                   \
     86      (Current).begin = (Rhs)[1].begin;                 \
     87      (Current).end   = (Rhs)[N].end;                   \
     88    }                                                   \
     89  else                                                  \
     90    {                                                   \
     91      (Current).begin = (Current).end = (Rhs)[0].end;   \
     92    }                                                   \
     93} while (false)
     94#endif
     95
    6396
    6497namespace lol {
    6598
    66 /* Line 35 of lalr1.cc  */
    67 #line 68 "generated/easymesh-parser.h"
     99/* Line 34 of lalr1.cc  */
     100#line 101 "generated/easymesh-parser.h"
    68101
    69102  /// A Bison parser.
     
    76109    {
    77110
    78 /* Line 35 of lalr1.cc  */
     111/* Line 34 of lalr1.cc  */
    79112#line 36 "easymesh/easymesh-parser.y"
    80113
     
    86119
    87120
    88 /* Line 35 of lalr1.cc  */
    89 #line 90 "generated/easymesh-parser.h"
     121/* Line 34 of lalr1.cc  */
     122#line 123 "generated/easymesh-parser.h"
    90123    };
    91124#else
     
    120153     T_SCALE = 276,
    121154     T_TOGGLESCALEWINDING = 277,
    122      T_CHAMFER = 278,
    123      T_CYLINDER = 279,
    124      T_BOX = 280,
    125      T_SMOOTHCHAMFBOX = 281,
    126      T_FLATCHAMFBOX = 282,
    127      T_SPHERE = 283,
    128      T_CAPSULE = 284,
    129      T_STAR = 285,
    130      T_EXPANDEDSTAR = 286,
    131      T_DISC = 287,
    132      T_TRIANGLE = 288,
    133      T_QUAD = 289,
    134      T_COG = 290,
    135      T_TORUS = 291,
    136      T_ERROR = 292,
    137      NUMBER = 293,
    138      COLOR = 294
     155     T_CSGUNION = 278,
     156     T_CSGSUBSTRACT = 279,
     157     T_CSGAND = 280,
     158     T_CSGXOR = 281,
     159     T_CHAMFER = 282,
     160     T_CYLINDER = 283,
     161     T_BOX = 284,
     162     T_SMOOTHCHAMFBOX = 285,
     163     T_FLATCHAMFBOX = 286,
     164     T_SPHERE = 287,
     165     T_CAPSULE = 288,
     166     T_STAR = 289,
     167     T_EXPANDEDSTAR = 290,
     168     T_DISC = 291,
     169     T_TRIANGLE = 292,
     170     T_QUAD = 293,
     171     T_COG = 294,
     172     T_TORUS = 295,
     173     T_ERROR = 296,
     174     NUMBER = 297,
     175     COLOR = 298
    139176   };
    140177
     
    210247    location_stack_type yylocation_stack_;
    211248
    212     /// Whether the given \c yypact_ value indicates a defaulted state.
    213     /// \param yyvalue   the value to check
    214     static bool yy_pact_value_is_default_ (int yyvalue);
    215 
    216     /// Whether the given \c yytable_ value indicates a syntax error.
    217     /// \param yyvalue   the value to check
    218     static bool yy_table_value_is_error_ (int yyvalue);
    219 
    220249    /// Internal symbol numbers.
    221250    typedef unsigned char token_number_type;
     
    225254    static const signed char yypact_ninf_;
    226255
    227     /// For a state, default reduction number.
     256    /// For a state, default rule to reduce.
    228257    /// Unless\a  yytable_ specifies something else to do.
    229258    /// Zero means the default is an error.
     
    256285#endif
    257286
     287#if YYERROR_VERBOSE
    258288    /// Convert the symbol name \a n to a form suitable for a diagnostic.
    259     static std::string yytnamerr_ (const char *n);
     289    virtual std::string yytnamerr_ (const char *n);
     290#endif
    260291
    261292#if YYDEBUG
     
    315346} // lol
    316347
    317 /* Line 35 of lalr1.cc  */
    318 #line 319 "generated/easymesh-parser.h"
     348/* Line 34 of lalr1.cc  */
     349#line 350 "generated/easymesh-parser.h"
    319350
    320351
Note: See TracChangeset for help on using the changeset viewer.