From 3b1bb08acd958195a460e3ca6fdd505ef7fbaec3 Mon Sep 17 00:00:00 2001 From: wz <wz_@users.sourceforge.net> Date: Sat, 16 Sep 2006 10:43:17 +0000 Subject: [PATCH] Changed XML Name of NiLODNode's data ref. Updated method names to use 'LOD'. Added documentation comments. --- include/obj/NiLODNode.h | 30 +++++++++++++++++++++--------- include/obj/NiRangeLODData.h | 20 ++++++++++++++------ include/obj/NiScreenLODData.h | 32 ++++++++++++++++++++++++++------ src/obj/NiLODNode.cpp | 12 ++++++------ src/obj/NiRangeLODData.cpp | 8 ++++---- 5 files changed, 71 insertions(+), 31 deletions(-) diff --git a/include/obj/NiLODNode.h b/include/obj/NiLODNode.h index 778b219c..6ac4fb44 100644 --- a/include/obj/NiLODNode.h +++ b/include/obj/NiLODNode.h @@ -42,22 +42,34 @@ public: virtual const Type & GetType() const; /*! - * Point to calculate distance from for switching? + * Get the point to calculate distance from for switching? */ - Vector3 GetLodCenter() const; - void SetLodCenter( const Vector3 & value ); + Vector3 GetLODCenter() const; /*! - * The ranges of distance that each level of detail applies in. + * Set the point to calculate distance from for switching? */ - vector<LODRange > GetLodLevels() const; - void SetLodLevels( const vector<LODRange >& value ); + void SetLODCenter( const Vector3 & value ); /*! - * Refers to LOD level information, either distance or screen size based. + * Get the ranges of distance that each level of detail applies in. */ - Ref<NiLODData > GetRangeData() const; - void SetRangeData( Ref<NiLODData > value ); + vector<LODRange > GetLODLevels() const; + + /*! + * Set the ranges of distance that each level of detail applies in. + */ + void SetLODLevels( const vector<LODRange >& value ); + + /*! + * Get the data object that refers to LOD level information + */ + Ref<NiLODData > GetLODLevelData() const; + + /*! + * Set the data object that refers to LOD level information + */ + void SetLODLevelData( Ref<NiLODData > value ); protected: NI_L_O_D_NODE_MEMBERS diff --git a/include/obj/NiRangeLODData.h b/include/obj/NiRangeLODData.h index a6377a9d..c6e401bd 100644 --- a/include/obj/NiRangeLODData.h +++ b/include/obj/NiRangeLODData.h @@ -38,16 +38,24 @@ public: virtual const Type & GetType() const; /*! - * ? + * Get the point to calculate distance from for switching? */ - Vector3 GetLodCenter() const; - void SetLodCenter( const Vector3 & value ); + Vector3 GetLODCenter() const; /*! - * The ranges of distance that each level of detail applies in. + * Set the point to calculate distance from for switching? */ - vector<LODRange > GetLodLevels() const; - void SetLodLevels( const vector<LODRange >& value ); + void SetLODCenter( const Vector3 & value ); + + /*! + * Get the ranges of distance that each level of detail applies in. + */ + vector<LODRange > GetLODLevels() const; + + /*! + * Set the ranges of distance that each level of detail applies in. + */ + void SetLODLevels( const vector<LODRange >& value ); protected: NI_RANGE_L_O_D_DATA_MEMBERS diff --git a/include/obj/NiScreenLODData.h b/include/obj/NiScreenLODData.h index 5b867338..1a3e7b47 100644 --- a/include/obj/NiScreenLODData.h +++ b/include/obj/NiScreenLODData.h @@ -34,33 +34,53 @@ public: virtual const Type & GetType() const; /*! - * The center of the bounding sphere? + * Get the center of the bounding sphere? */ Vector3 GetBoundCenter() const; - void SetBoundCenter( const Vector3 & value ); /*! - * The radius of the bounding sphere? + * Set the center of the bounding sphere? + */ + void SetBoundCenter( const Vector3 & bound_center ); + + /*! + * Get the radius of the bounding sphere? */ float GetBoundRadius() const; + + /*! + * Set the radius of the bounding sphere? + */ void SetBoundRadius( float value ); /*! - * The center of the bounding sphere in world space? + * Get the center of the bounding sphere in world space? */ Vector3 GetWorldCenter() const; + + /*! + * Set the center of the bounding sphere in world space? + */ void SetWorldCenter( const Vector3 & value ); /*! - * The radius of the bounding sphere in world space? + * Get the radius of the bounding sphere in world space? */ float GetWorldRadius() const; + + /*! + * Set the radius of the bounding sphere in world space? + */ void SetWorldRadius( float value ); /*! - * The LOD levels based on proportion of screen size? + * Get the LOD levels based on proportion of screen size? */ vector<float > GetProportionLevels() const; + + /*! + * Set the LOD levels based on proportion of screen size? + */ void SetProportionLevels( const vector<float >& value ); protected: diff --git a/src/obj/NiLODNode.cpp b/src/obj/NiLODNode.cpp index 455d2498..d02c5ff2 100644 --- a/src/obj/NiLODNode.cpp +++ b/src/obj/NiLODNode.cpp @@ -37,27 +37,27 @@ const Type & NiLODNode::GetType() const { return TYPE; }; -Vector3 NiLODNode::GetLodCenter() const { +Vector3 NiLODNode::GetLODCenter() const { return lodCenter; } -void NiLODNode::SetLodCenter( const Vector3 & value ) { +void NiLODNode::SetLODCenter( const Vector3 & value ) { lodCenter = value; } -vector<LODRange > NiLODNode::GetLodLevels() const { +vector<LODRange > NiLODNode::GetLODLevels() const { return lodLevels; } -void NiLODNode::SetLodLevels( const vector<LODRange >& value ) { +void NiLODNode::SetLODLevels( const vector<LODRange >& value ) { lodLevels = value; } -Ref<NiLODData > NiLODNode::GetRangeData() const { +Ref<NiLODData > NiLODNode::GetLODLevelData() const { return rangeData; } -void NiLODNode::SetRangeData( Ref<NiLODData > value ) { +void NiLODNode::SetLODLevelData( Ref<NiLODData > value ) { rangeData = value; } diff --git a/src/obj/NiRangeLODData.cpp b/src/obj/NiRangeLODData.cpp index fa169a50..1adf2507 100644 --- a/src/obj/NiRangeLODData.cpp +++ b/src/obj/NiRangeLODData.cpp @@ -36,19 +36,19 @@ const Type & NiRangeLODData::GetType() const { return TYPE; }; -Vector3 NiRangeLODData::GetLodCenter() const { +Vector3 NiRangeLODData::GetLODCenter() const { return lodCenter; } -void NiRangeLODData::SetLodCenter( const Vector3 & value ) { +void NiRangeLODData::SetLODCenter( const Vector3 & value ) { lodCenter = value; } -vector<LODRange > NiRangeLODData::GetLodLevels() const { +vector<LODRange > NiRangeLODData::GetLODLevels() const { return lodLevels; } -void NiRangeLODData::SetLodLevels( const vector<LODRange >& value ) { +void NiRangeLODData::SetLODLevels( const vector<LODRange >& value ) { lodLevels = value; } -- GitLab