17 INLINE GeomVertexColumn::
26 INLINE GeomVertexColumn::
28 NumericType numeric_type, Contents contents,
29 int start,
int column_alignment,
int num_elements,
31 _name(std::move(name)),
32 _num_components(num_components),
33 _numeric_type(numeric_type),
36 _column_alignment(column_alignment),
37 _num_elements(num_elements),
38 _element_stride(element_stride),
47 INLINE GeomVertexColumn::
50 _num_components(copy._num_components),
51 _numeric_type(copy._numeric_type),
52 _contents(copy._contents),
54 _column_alignment(copy._column_alignment),
55 _num_elements(copy._num_elements),
56 _element_stride(copy._element_stride),
65 INLINE GeomVertexColumn::
88 return _num_components;
109 return _num_elements;
117 return _numeric_type;
145 return _column_alignment;
154 return _element_stride;
163 return _component_bytes;
200 return (_start < start_byte + num_bytes &&
201 _start + _total_bytes > start_byte);
211 return (_num_components == other._num_components &&
212 _numeric_type == other._numeric_type &&
213 _contents == other._contents);
222 return (_num_components == 1 &&
223 _numeric_type == NT_packed_dabc &&
224 _contents == C_color);
233 return (_num_components == 4 &&
234 _numeric_type == NT_uint8 &&
235 _contents == C_color);
244 if (_name != other._name) {
245 return _name < other._name ? -1 : 1;
247 if (_num_components != other._num_components) {
248 return _num_components - other._num_components;
250 if (_numeric_type != other._numeric_type) {
251 return (
int)_numeric_type - (int)other._numeric_type;
253 if (_contents != other._contents) {
254 return (
int)_contents - (int)other._contents;
256 if (_start != other._start) {
257 return _start - other._start;
259 if (_column_alignment != other._column_alignment) {
260 return _column_alignment - other._column_alignment;
262 if (_num_elements != other._num_elements) {
263 return _num_elements - other._num_elements;
265 if (_element_stride != other._element_stride) {
266 return _element_stride - other._element_stride;
282 INLINE
bool GeomVertexColumn::
294 if (_start != other._start) {
295 return _start < other._start;
297 if (_total_bytes < other._total_bytes) {
298 return _total_bytes < other._total_bytes;
303 INLINE std::ostream &
bool is_uint8_rgba() const
Returns true if this column is the standard OpenGL representation of 4-component color: C_color,...
This is a const pointer to an InternalName, and should be used in lieu of a CPT(InternalName) in func...
bool overlaps_with(int start_byte, int num_bytes) const
Returns true if this column overlaps with any of the bytes in the indicated range,...
Contents get_contents() const
Returns the token representing the semantic meaning of the stored value.
NumericType get_numeric_type() const
Returns the token representing the numeric type of the data storage.
bool is_bytewise_equivalent(const GeomVertexColumn &other) const
Returns true if the data store of this column is exactly the same as that of the other,...
bool has_homogeneous_coord() const
Returns true if this Contents type is one that includes a homogeneous coordinate in the fourth compon...
bool is_packed_argb() const
Returns true if this column is the standard DirectX representation of 4-component color: C_color,...
This defines how a single column is interleaved within a vertex array stored within a Geom.
int get_num_elements() const
Returns the number of times this column is repeated.
bool operator==(const GeomVertexColumn &other) const
Returns true if the two columns are exactly equivalent, false otherwise.
int get_element_stride() const
This value is only relevant for matrix types.
int get_num_values() const
Returns the number of numeric values of the column: the number of distinct numeric values that go int...
bool operator<(const GeomVertexColumn &other) const
This is used to put columns in order within a particular GeomVertexArrayFormat.
int get_column_alignment() const
Returns the alignment requirements for this column.
Encodes a string name in a hash table, mapping it to a pointer.
int get_start() const
Returns the byte within the array record at which this column starts.
int get_component_bytes() const
Returns the number of bytes used by each component (that is, by one element of the numeric type).
const InternalName * get_name() const
Returns the name of this particular data field, e.g.
int get_total_bytes() const
Returns the number of bytes used by each element of the column: component_bytes * num_components.
int get_num_components() const
Returns the number of components of the column: the number of instances of the NumericType in each el...
int compare_to(const GeomVertexColumn &other) const
This is used to unquify columns, and hence formats, for the GeomVertexFormat registry.