From 2e1174063f3ed6bcf929bc7093cd2d1b05f8518b Mon Sep 17 00:00:00 2001 From: Nicholas Estelami Date: Tue, 19 Jan 2021 15:08:29 -0500 Subject: Added in support for ZArray (WIP) and ZVtx. Also cleaned up some of the virtual functions. (#73) --- ZAPD/ZVector.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'ZAPD/ZVector.cpp') 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 strings = std::vector(); 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) -- cgit v1.2.3