35 #ifndef IECOREGL_CURVESPRIMITIVE_H
36 #define IECOREGL_CURVESPRIMITIVE_H
38 #include "IECore/VectorTypedData.h"
39 #include "IECore/CubicBasis.h"
41 #include "IECoreGL/Export.h"
42 #include "IECoreGL/Primitive.h"
47 IE_CORE_FORWARDDECLARE( Buffer )
49 class IECOREGL_API CurvesPrimitive : public Primitive
53 IE_CORE_DECLARERUNTIMETYPEDEXTENSION( IECoreGL::CurvesPrimitive, CurvesPrimitiveTypeId, Primitive );
55 CurvesPrimitive(
const IECore::CubicBasisf &basis,
bool periodic, IECore::ConstIntVectorDataPtr vertsPerCurve,
float width=1.0f );
56 ~CurvesPrimitive()
override;
58 Imath::Box3f bound()
const override;
60 const Shader::Setup *shaderSetup(
const Shader *shader, State *state )
const override;
61 void render(
const State *currentState,
IECore::TypeId style )
const override;
63 void renderInstances(
size_t numInstances = 1 )
const override;
70 typedef TypedStateComponent<bool, CurvesPrimitiveIgnoreBasisTypeId> IgnoreBasis;
74 IE_CORE_DECLAREPTR( IgnoreBasis );
77 typedef TypedStateComponent<bool, CurvesPrimitiveUseGLLinesTypeId> UseGLLines;
78 IE_CORE_DECLAREPTR( UseGLLines );
81 typedef TypedStateComponent<float, CurvesPrimitiveGLLineWidthTypeId> GLLineWidth;
82 IE_CORE_DECLAREPTR( GLLineWidth );
87 void renderMode(
const State *state,
bool &linear,
bool &ribbons )
const;
89 static const std::string &cubicLinesGeometrySource();
90 static const std::string &cubicRibbonsGeometrySource();
91 static const std::string &linearRibbonsGeometrySource();
93 void ensureVertIds()
const;
94 void ensureAdjacencyVertIds()
const;
95 void ensureLinearAdjacencyVertIds()
const;
97 IE_CORE_FORWARDDECLARE( MemberData );
98 MemberDataPtr m_memberData;
102 IE_CORE_DECLAREPTR( CurvesPrimitive );
106 #endif // IECOREGL_CURVESPRIMITIVE_H
The namespace within which all CoreGL functionality is defined.
Definition: AlphaTexture.h:41
Definition: PrimitiveVariable.h:47
TypeId
Definition: TypeIds.h:46