diff options
| author | Nicholas Estelami <NEstelami@users.noreply.github.com> | 2021-01-19 15:08:29 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-19 15:08:29 -0500 |
| commit | 2e1174063f3ed6bcf929bc7093cd2d1b05f8518b (patch) | |
| tree | d62ac506b1017296dba708030745743da90a5b2d /ZAPD/ZVector.cpp | |
| parent | fda77edbcfcee7675fd1549553114d690d4fcd39 (diff) | |
Added in support for ZArray (WIP) and ZVtx. Also cleaned up some of the virtual functions. (#73)
Diffstat (limited to 'ZAPD/ZVector.cpp')
| -rw-r--r-- | ZAPD/ZVector.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ZAPD/ZVector.cpp b/ZAPD/ZVector.cpp index c7a6c52..e9eba2f 100644 --- a/ZAPD/ZVector.cpp +++ b/ZAPD/ZVector.cpp @@ -42,7 +42,9 @@ void ZVector::ParseRawData() int currentRawDataIndex = this->rawDataIndex; scalars.clear(); - for (int i = 0; i < this->dimensions; i++) { + + for (int i = 0; i < this->dimensions; i++) + { ZScalar* scalar = new ZScalar(this->scalarType); scalar->rawDataIndex = currentRawDataIndex; scalar->rawData = this->rawData; @@ -64,6 +66,11 @@ int ZVector::GetRawDataSize() return size; } +bool ZVector::DoesSupportArray() +{ + return true; +} + std::string ZVector::GetSourceTypeName() { if (dimensions == 3 && scalarType == ZSCALAR_F32) @@ -94,7 +101,7 @@ std::string ZVector::GetSourceValue() std::vector<std::string> strings = std::vector<std::string>(); for (int i = 0; i < this->scalars.size(); i++) strings.push_back(scalars[i]->GetSourceValue()); - return StringHelper::Implode(strings, ", "); + return "{ " + StringHelper::Implode(strings, ", ") + " }"; } std::string ZVector::GetSourceOutputCode(const std::string& prefix) |
