src/ldtypes.h

changeset 316
b4fefda58f43
parent 312
97620579d86c
child 357
9c954c222996
equal deleted inserted replaced
315:cb0c23f35e2b 316:b4fefda58f43
90 DECLARE_PROPERTY (short, color, setColor) 90 DECLARE_PROPERTY (short, color, setColor)
91 91
92 public: 92 public:
93 // Object type codes. Codes are sorted in order of significance. 93 // Object type codes. Codes are sorted in order of significance.
94 enum Type { 94 enum Type {
95 Subfile, // Object represents a sub-file reference 95 Subfile, // Object represents a sub-file reference
96 Quad, // Object represents a quadrilateral 96 Quad, // Object represents a quadrilateral
97 Triangle, // Object represents a triangle 97 Triangle, // Object represents a triangle
98 Line, // Object represents a line 98 Line, // Object represents a line
99 CondLine, // Object represents a conditional line 99 CondLine, // Object represents a conditional line
100 Vertex, // Object is a vertex, LDForge extension object 100 Vertex, // Object is a vertex, LDForge extension object
101 BFC, // Object represents a BFC statement 101 BFC, // Object represents a BFC statement
102 Comment, // Object represents a comment 102 Overlay, // Object contains meta-info about an overlay image.
103 Gibberish, // Object is the result of failed parsing 103 Comment, // Object represents a comment
104 Empty, // Object represents an empty line 104 Gibberish, // Object is the result of failed parsing
105 Unidentified, // Object is an uninitialized (SHOULD NEVER HAPPEN) 105 Empty, // Object represents an empty line
106 NumTypes // Amount of object types 106 Unidentified, // Object is an uninitialized (SHOULD NEVER HAPPEN)
107 NumTypes // Amount of object types
107 }; 108 };
108 109
109 LDObject (); 110 LDObject ();
110 virtual ~LDObject (); 111 virtual ~LDObject ();
111 112
387 388
388 vertex pos; 389 vertex pos;
389 }; 390 };
390 391
391 // ============================================================================= 392 // =============================================================================
393 // LDOverlay
394 //
395 // Overlay image meta, stored in the header of parts so as to preserve overlay
396 // information.
397 // =============================================================================
398 class LDOverlay : public LDObject
399 {
400 public:
401 LDOBJ( Overlay )
402 LDOBJ_VERTICES( 0 )
403 LDOBJ_UNCOLORED
404 LDOBJ_NON_SCEMANTIC
405 LDOBJ_NO_MATRIX
406 PROPERTY( int, camera, setCamera )
407 PROPERTY( int, x, setX )
408 PROPERTY( int, y, setY )
409 PROPERTY( int, width, setWidth )
410 PROPERTY( int, height, setHeight )
411 PROPERTY( str, filename, setFilename )
412 };
413
414 // =============================================================================
392 // Object type names. Pass the return value of getType as the index to get a 415 // Object type names. Pass the return value of getType as the index to get a
393 // string representation of the object's type. 416 // string representation of the object's type.
394 extern const char* g_saObjTypeNames[]; 417 extern const char* g_saObjTypeNames[];
395 418
396 // Icons for these types 419 // Icons for these types

mercurial