21 #include <type_traits>
23 template<
typename PrimT,
typename DetailT>
41 template<
typename OtherPrimT,
typename OtherDetailT>
44 : myDetail(that.myDetail)
45 , myOffset(that.myOffset)
54 : myDetail(that ? (DetailT*)&that->getDetail() : nullptr)
57 template<
typename OtherPrimT,
typename OtherDetailT>
65 myDetail = that.myDetail;
66 myOffset = that.myOffset;
78 myDetail = (DetailT*)&that->getDetail();
79 myOffset = that->getMapOffset();
83 template<
typename OtherPrimT,
typename OtherDetailT>
87 return myDetail == that.myDetail && myOffset == that.myOffset;
89 template<
typename OtherPrimT,
typename OtherDetailT>
93 return !((*this) == that);
100 return myDetail == &that->getDetail() && myOffset == that->getMapOffset();
105 return !((*this) == that);
115 return !myDetail || !
GAisValid(myOffset);
121 return *(PrimT *)myDetail->getPrimitive(myOffset);
127 return (PrimT *)myDetail->getPrimitive(myOffset);
130 operator PrimT*()
const
134 return (PrimT *)myDetail->getPrimitive(myOffset);
136 template <
typename OtherPrimT>
142 return UTverify_cast<OtherPrimT>(myDetail->getPrimitive(myOffset));
168 return myDetail->getPrimitiveTypeId(myOffset);
178 return myDetail->getPrimitiveClosedFlag(myOffset);
SYS_FORCE_INLINE GA_PrimitiveP_T & operator=(PrimT *that)
SYS_FORCE_INLINE GA_PrimitiveP_T(PrimT *that)
SYS_FORCE_INLINE bool operator!=(const PrimT *that) const
UT_ASSERT_COMPILETIME(BRAY_EVENT_MAXFLAGS<=32)
SYS_FORCE_INLINE GA_PrimitiveP_T()
SYS_FORCE_INLINE PrimT * operator->() const
GLsizei const GLfloat * value
void set(DetailT *detail, GA_Offset offset)
SYS_FORCE_INLINE GA_PrimCompat::TypeMask getPrimitiveId() const
SYS_FORCE_INLINE TO_T UTverify_cast(FROM_T from)
SYS_FORCE_INLINE bool operator==(const GA_PrimitiveP_T< OtherPrimT, OtherDetailT > &that) const
SYS_FORCE_INLINE bool GAisValid(GA_Size v)
SYS_FORCE_INLINE bool operator!() const
#define GA_INVALID_OFFSET
SYS_FORCE_INLINE bool operator==(const PrimT *that) const
SYS_FORCE_INLINE DetailT & detailRef() const
SYS_FORCE_INLINE OtherPrimT castPtr() const
SYS_FORCE_INLINE bool operator!=(const GA_PrimitiveP_T< OtherPrimT, OtherDetailT > &that) const
SYS_FORCE_INLINE GA_PrimitiveP_T(const GA_PrimitiveP_T< OtherPrimT, OtherDetailT > &that)
SYS_FORCE_INLINE GA_PrimitiveP_T & operator=(const GA_PrimitiveP_T< OtherPrimT, OtherDetailT > &that)
SYS_FORCE_INLINE DetailT * detail() const
SYS_FORCE_INLINE GA_Offset offset() const
SYS_FORCE_INLINE PrimT & operator*() const
SYS_FORCE_INLINE bool isClosed() const
SYS_FORCE_INLINE int getTypeId() const
static SYS_FORCE_INLINE GA_PrimCompat::TypeMask primCompatMaskFromTypeId(int type_id)
SYS_FORCE_INLINE GA_PrimitiveP_T(DetailT *detail, GA_Offset offset)