18 #ifndef ION_GFX_SHAPE_H_
19 #define ION_GFX_SHAPE_H_
48 const std::string&
GetLabel()
const {
return label_; }
57 attribute_array_ = attribute_array;
60 return attribute_array_;
66 index_buffer_ = index_buffer;
94 void EnableVertexRange(
size_t i,
bool enable);
97 bool IsVertexRangeEnabled(
size_t i)
const;
113 void SetVertexRangeInstanceCount(
size_t i,
int instance_count);
115 int GetVertexRangeInstanceCount(
size_t i)
const;
127 VertexRange() : is_enabled(false), instance_count(0) {}
128 VertexRange(
const math::Range1i& range_in,
bool is_enabled_in,
129 int instance_count_in)
131 is_enabled(is_enabled_in),
132 instance_count(instance_count_in) {}
144 bool CheckRangeIndex(
size_t i,
const char*
name)
const;
147 PrimitiveType primitive_type_;
154 base::AllocVector<VertexRange> vertex_ranges_;
172 #endif // ION_GFX_SHAPE_H_
void SetPrimitiveType(PrimitiveType type)
Sets/returns the type of primitive to draw.
PrimitiveType GetPrimitiveType() const
base::ReferentPtr< Shape >::Type ShapePtr
Convenience typedef for shared pointer to a Shape.
Range< 1, int32 > Range1i
void SetInstanceCount(int count)
Sets the instance count of the shape.
size_t GetVertexRangeCount() const
Returns the number of vertex ranges in the Shape.
Thread-safe abstract base class.
base::ReferentPtr< IndexBuffer >::Type IndexBufferPtr
void SetAttributeArray(const AttributeArrayPtr &attribute_array)
Sets/returns the vertices used to create the primitives.
A Shape object represents a shape (vertices + indices) to draw.
void SetIndexBuffer(const IndexBufferPtr &index_buffer)
Sets/returns the index buffer.
PrimitiveType
Supported primitive types.
void ClearVertexRanges()
Removes all ranges from the Shape.
int GetInstanceCount() const
Returns the instance count that the shape is set to.
base::ReferentPtr< AttributeArray >::Type AttributeArrayPtr
Convenience typedef for shared pointer to a AttributeArray.
const AttributeArrayPtr & GetAttributeArray() const
const IndexBufferPtr & GetIndexBuffer() const
void SetLabel(const std::string &label)
const std::string & GetLabel() const
Returns/sets the label of this.
A SharedPtr is a smart shared pointer to an instance of some class that implements reference counting...