src/ldObject.h

changeset 847
274a7fac44fc
parent 844
11587d419d2f
child 848
68410477c8bb
equal deleted inserted replaced
846:e4ad109f33c6 847:274a7fac44fc
369 369
370 // 370 //
371 // 371 //
372 // Represents a 0 BFC statement in the LDraw code. 372 // Represents a 0 BFC statement in the LDraw code.
373 // 373 //
374 enum class BFCStatement
375 {
376 CertifyCCW,
377 CCW,
378 CertifyCW,
379 CW,
380 NoCertify,
381 InvertNext,
382 Clip,
383 ClipCCW,
384 ClipCW,
385 NoClip,
386
387 NumValues,
388 FirstValue = CertifyCCW
389 };
390
374 class LDBFC : public LDObject 391 class LDBFC : public LDObject
375 { 392 {
376 public: 393 public:
377 enum Statement
378 {
379 CertifyCCW,
380 CCW,
381 CertifyCW,
382 CW,
383 NoCertify,
384 InvertNext,
385 Clip,
386 ClipCCW,
387 ClipCW,
388 NoClip,
389 NumStatements
390 };
391
392 LDOBJ (BFC) 394 LDOBJ (BFC)
393 LDOBJ_NAME (bfc) 395 LDOBJ_NAME (bfc)
394 LDOBJ_VERTICES (0) 396 LDOBJ_VERTICES (0)
395 LDOBJ_UNCOLORED 397 LDOBJ_UNCOLORED
396 LDOBJ_CUSTOM_SCEMANTIC { return (statement() == InvertNext); } 398 LDOBJ_CUSTOM_SCEMANTIC { return (statement() == BFCStatement::InvertNext); }
397 LDOBJ_NO_MATRIX 399 LDOBJ_NO_MATRIX
398 PROPERTY (public, Statement, statement, setStatement, STOCK_WRITE) 400 PROPERTY (public, BFCStatement, statement, setStatement, STOCK_WRITE)
399 401
400 public: 402 public:
401 LDBFC (LDObjectPtr* selfptr, const LDBFC::Statement type) : 403 LDBFC (LDObjectPtr* selfptr, const BFCStatement type) :
402 LDObject (selfptr), 404 LDObject (selfptr),
403 m_statement (type) {} 405 m_statement (type) {}
404 406
405 // Statement strings 407 // Statement strings
406 static const char* k_statementStrings[]; 408 static const char* StatementStrings[];
407 }; 409 };
408 410
409 using LDBFCPtr = QSharedPointer<LDBFC>; 411 using LDBFCPtr = QSharedPointer<LDBFC>;
410 using LDBFCWeakPtr = QWeakPointer<LDBFC>; 412 using LDBFCWeakPtr = QWeakPointer<LDBFC>;
411 413

mercurial