class
geometry_tdescribes a stream of data that will be uploaded to the GPU as geometry data.
Unlike most engines, geometry data in paradigm is considered a collection of undescribed data, that has been keyed. There are some globally accepted keys defined for convenience at the core::
types
classes
static variables
member-functions
Function documentation
const core:: vertex_stream_t& core:: data:: geometry_t:: vertices(const psl:: string_view name = constants:: POSITION) const
Brief
returns the stream reference for the given key.
Returns | the stream reference for the given key. \warn if you are uncertain the stream exists, run the contains method first. The vertices method will terminate if the stream isn't found. |
---|
bool core:: data:: geometry_t:: contains(const psl:: string_view name) const noexcept
Brief
verifies if the given stream is present in the data
Parameters | |
---|---|
name | stream name see constants:: |
Returns | true if the stream exists |
void core:: data:: geometry_t:: vertices(const psl:: string_view name,
const core:: vertex_stream_t& stream)
Brief
sets the stream data for the given key. If data was already present, then it gets replaced.
Details
const std::vector<index_ size_ t>& core:: data:: geometry_t:: indices() const
Brief
gets all indices that are currently assigned to this model data.
Returns | all indices that are currently assigned to this model data. |
---|
void core:: data:: geometry_t:: indices(psl:: array_view<index_ size_ t> indices)
Brief
sets the indices.
Details
const std::unordered_map<psl:: string, core:: vertex_stream_t>& core:: data:: geometry_t:: vertex_streams() const
Brief
returns all the streams of data and their keys.
Returns | all the streams of data and their keys. |
---|
bool core:: data:: geometry_t:: is_valid() const noexcept
Brief
helper method to check for validity of the model data in its current state.
Returns | true if the data passes all checks. |
---|
template<typename S>
void core:: data:: geometry_t:: serialize(S& serializer) private
Brief
serialization method to be used by the serializer when writing this container to the disk.
Parameters | |
---|---|
serializer in | the serialization object, consult the serialization namespace for more information. |