HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GSTY_SubjectPrim.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GSTY_SubjectPrim.h ( GSTY Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GSTY_SubjectPrim__
12 #define __GSTY_SubjectPrim__
13 
14 #include "GSTY_API.h"
15 #include <STY/STY_SubjectNamed.h>
16 #include <GA/GA_Handle.h>
17 
19 class GEO_Primitive;
20 class GEO_Detail;
21 
22 /// Represents a primitive whose material properties are being overiden.
24 {
25 public:
26  GSTY_SubjectPrim(const GEO_Primitive *prim,
27  int numeric_prim_group_offset,
28  int numeric_point_group_offset,
29  GSTY_SubjectPrimGroup *subject_group,
30  const GA_ROHandleS &detail_attrib,
31  const GA_ROHandleS &prim_attrib);
32 
33  // Note: this constructor will perform attribute lookups, which can be
34  // expensive.
35  GSTY_SubjectPrim(const GEO_Primitive *prim,
36  GSTY_SubjectPrimGroup *subject_group);
37 
38  /// Base class overrides.
39  virtual STY_TargetMatchStatus
43  const UT_StringHolder &data_name) const;
44  virtual STY_StyleSheetHandle
45  getPreFilterStyleSheet() const;
46  virtual STY_StyleSheetHandle
48  virtual UT_StringHolder
49  getSourceLocation() const;
50 
51  const GEO_Primitive &getPrimitive() const;
52 
53  /// Returns true if the provided detail has any attributes that may
54  /// contribute style information to this subject.
55  static bool hasStyleAttrib(const GEO_Detail &gdp);
56 
57 private:
58  /// Base class overrides.
59  virtual UT_StringHolder getSubjectName() const;
60  virtual int64 getSubjectID() const;
61 
62  /// Reference to the primitve represented by this styling subject.
63  const GEO_Primitive *myPrimitive;
64  GSTY_SubjectPrimGroup *mySubjectGroup;
65  GA_ROHandleS myDetailAttrib;
66  GA_ROHandleS myPrimAttrib;
67  int myNumericPrimGroupOffset;
68  int myNumericPointGroupOffset;
69 };
70 
71 #endif
72 
#define GSTY_API
Definition: GSTY_API.h:10
virtual STY_TargetMatchStatus matchesStyleTarget(const STY_TargetHandle &target) const =0
Returns the information wheter the subject matches the given target.
virtual UT_StringHolder getSubjectName() const =0
Contains information about the style subject match to the style target.
Represents a group of primitives that can be affected by style sheets.
virtual STY_StyleSheetHandle getPreFilterStyleSheet() const
long long int64
Definition: SYS_Types.h:100
virtual STY_BindingDataSourceHandle getOverrideBindingDataSource(const UT_StringHolder &data_name) const
virtual UT_StringHolder getSourceLocation() const
GLenum target
Definition: glcorearb.h:1666
virtual STY_StyleSheetHandle getPostFilterStyleSheet() const
Represents a primitive whose material properties are being overiden.
Helper class for subjects that have names and IDs.
virtual int64 getSubjectID() const =0
Read-only handle for string attribute data.
Definition: GA_Handle.h:873