HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GSTY_SubjectPoint.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_SubjectPoint.h ( GSTY Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GSTY_SubjectPoint__
12 #define __GSTY_SubjectPoint__
13 
14 #include "GSTY_API.h"
15 #include <GA/GA_Types.h>
16 #include <GA/GA_Handle.h>
17 #include <STY/STY_SubjectNamed.h>
18 
20 class GEO_Detail;
21 
22 /// Represents a primitive whose material properties are being overiden.
24 {
25 public:
26  GSTY_SubjectPoint(const GEO_Detail &gdp,
28  int numeric_point_group_offset,
29  GSTY_SubjectPointGroup *subject_group,
30  const GA_ROHandleS &detail_attrib,
31  const GA_ROHandleS &point_attrib);
32 
33  // Note: this constructor will perform attribute lookups, which can be
34  // expensive.
35  GSTY_SubjectPoint(const GEO_Detail &gdp,
36  GA_Offset offset);
37 
38  /// Base class overrides.
40  matchesStyleTarget(const STY_TargetHandle &target) const override;
43  const UT_StringHolder &data_name) const override;
45  getPreFilterStyleSheet() const override;
47  getPostFilterStyleSheet() const override;
49  getSourceLocation() const override;
50 
51  const GEO_Detail &getGdp() const;
52  GA_Offset getOffset() const;
53 
54  /// Returns true if the provided detail has any attributes that may
55  /// contribute style information to this subject.
56  static bool hasStyleAttrib(const GEO_Detail &gdp);
57 
58 private:
59  /// Base class overrides.
60  UT_StringHolder getSubjectName() const override;
61  int64 getSubjectID() const override;
62 
63  /// Reference to the primitve represented by this styling subject.
64  const GEO_Detail *myGdp;
65  GSTY_SubjectPointGroup *mySubjectGroup;
66  GA_ROHandleS myDetailAttrib;
67  GA_ROHandleS myPointAttrib;
68  GA_Offset myOffset;
69  int myNumericPointGroupOffset;
70 };
71 
72 #endif
73 
#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
Represents a group of primitives that can be affected by style sheets.
Contains information about the style subject match to the style target.
virtual STY_StyleSheetHandle getPreFilterStyleSheet() const
GA_Size GA_Offset
Definition: GA_Types.h:646
virtual STY_BindingDataSourceHandle getOverrideBindingDataSource(const UT_StringHolder &data_name) const
GLintptr offset
Definition: glcorearb.h:665
virtual UT_StringHolder getSourceLocation() const
long long int64
Definition: SYS_Types.h:116
GLenum target
Definition: glcorearb.h:1667
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