From 1cdf912779bd939e65443db1a7e1351937a140cc Mon Sep 17 00:00:00 2001
From: Alecu100 <lui_alecu@yahoo.co.uk>
Date: Sun, 15 Jan 2012 02:24:03 +0200
Subject: [PATCH] made more changes to get the number of control points in the
 NiBSplineData

---
 include/obj/NiBSplineData.h | 12 ++++++++++++
 src/obj/NiBSplineData.cpp   | 12 +++++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/include/obj/NiBSplineData.h b/include/obj/NiBSplineData.h
index 3372eeba..e83e15a8 100644
--- a/include/obj/NiBSplineData.h
+++ b/include/obj/NiBSplineData.h
@@ -72,6 +72,12 @@ public:
 	*/
 	NIFLIB_API void AppendFloatControlPoints(vector<float> value);
 
+	/*!
+	* Get the number of float control points stored in the data
+	* \return The number of float control points
+	*/
+	NIFLIB_API int GetNumFloatControlPoints();
+
 	/*!
 	 * Get Range of signed shorts representing the data scaled by SHRT_MAX.
 	 * \param[in] offset The start of the range.
@@ -98,6 +104,12 @@ public:
 	*/
 	NIFLIB_API void AppendShortControlPoints(vector<short> value);
 
+	/*!
+	* Get the number of short control points stored in the data
+	* \return The number of short control points
+	*/
+	NIFLIB_API int GetNumShortControlPoints();
+
 	/*!
 	 * Get Range of signed shorts representing the data scaled by SHRT_MAX.
 	 * \param[in] offset The start of the range.
diff --git a/src/obj/NiBSplineData.cpp b/src/obj/NiBSplineData.cpp
index bd114438..9e887f4e 100644
--- a/src/obj/NiBSplineData.cpp
+++ b/src/obj/NiBSplineData.cpp
@@ -157,7 +157,6 @@ void NiBSplineData::SetFloatControlPoints( vector<float> value )
 	}
 }
 
-
 void NiBSplineData::AppendFloatControlPoints( vector<float> value )
 {
 	this->numFloatControlPoints += value.size();
@@ -167,6 +166,10 @@ void NiBSplineData::AppendFloatControlPoints( vector<float> value )
 	}
 }
 
+int NiBSplineData::GetNumFloatControlPoints()
+{
+	return this->numFloatControlPoints;
+}
 
 vector<float> NiBSplineData::GetFloatControlPointRange(int offset, int count) const
 {
@@ -203,6 +206,13 @@ void NiBSplineData::AppendShortControlPoints( vector<short> value )
 	}
 }
 
+
+int NiBSplineData::GetNumShortControlPoints()
+{
+	return this->numShortControlPoints;
+}
+
+
 vector<short > NiBSplineData::GetShortControlPointRange(int offset, int count) const
 {
    vector<short> value;
-- 
GitLab