Skip to content
Snippets Groups Projects
Commit b0572049 authored by wz's avatar wz
Browse files

Created accessors for LOD type nodes.

Updated NiScreenLODNode in Nif.xml to use 'ProportionLevels'.
parent 68db992e
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,24 @@ public:
virtual list<NiObjectRef> GetRefs() const;
virtual const Type & GetType() const;
/*!
* Point to calculate distance from for switching?
*/
Vector3 GetLodCenter() const;
void SetLodCenter( const Vector3 & value );
/*!
* The ranges of distance that each level of detail applies in.
*/
vector<LODRange > GetLodLevels() const;
void SetLodLevels( const vector<LODRange >& value );
/*!
* Refers to LOD level information, either distance or screen size based.
*/
Ref<NiLODData > GetRangeData() const;
void SetRangeData( Ref<NiLODData > value );
protected:
NI_L_O_D_NODE_MEMBERS
STANDARD_INTERNAL_METHODS
......
......@@ -17,7 +17,8 @@ class NiRangeLODData;
typedef Ref<NiRangeLODData> NiRangeLODDataRef;
/*!
* NiRangeLODData - Describes levels of detail.
* NiRangeLODData - Describes levels of detail based on distance of
* object from camera.
*/
class NIFLIB_API NiRangeLODData : public NI_RANGE_L_O_D_DATA_PARENT {
......@@ -36,6 +37,18 @@ public:
virtual list<NiObjectRef> GetRefs() const;
virtual const Type & GetType() const;
/*!
* ?
*/
Vector3 GetLodCenter() const;
void SetLodCenter( const Vector3 & value );
/*!
* The ranges of distance that each level of detail applies in.
*/
vector<LODRange > GetLodLevels() const;
void SetLodLevels( const vector<LODRange >& value );
protected:
NI_RANGE_L_O_D_DATA_MEMBERS
STANDARD_INTERNAL_METHODS
......
......@@ -13,7 +13,8 @@ class NiScreenLODData;
typedef Ref<NiScreenLODData> NiScreenLODDataRef;
/*!
* NiScreenLODData - Unknown.
* NiScreenLODData - Describes levels of detail based on size of object
* on screen?
*/
class NIFLIB_API NiScreenLODData : public NI_SCREEN_L_O_D_DATA_PARENT {
......@@ -32,6 +33,36 @@ public:
virtual list<NiObjectRef> GetRefs() const;
virtual const Type & GetType() const;
/*!
* The center of the bounding sphere?
*/
Vector3 GetBoundCenter() const;
void SetBoundCenter( const Vector3 & value );
/*!
* The radius of the bounding sphere?
*/
float GetBoundRadius() const;
void SetBoundRadius( float value );
/*!
* The center of the bounding sphere in world space?
*/
Vector3 GetWorldCenter() const;
void SetWorldCenter( const Vector3 & value );
/*!
* The radius of the bounding sphere in world space?
*/
float GetWorldRadius() const;
void SetWorldRadius( float value );
/*!
* The LOD levels based on proportion of screen size?
*/
vector<float > GetProportionLevels() const;
void SetProportionLevels( const vector<float >& value );
protected:
NI_SCREEN_L_O_D_DATA_MEMBERS
STANDARD_INTERNAL_METHODS
......
......@@ -37,3 +37,27 @@ const Type & NiLODNode::GetType() const {
return TYPE;
};
Vector3 NiLODNode::GetLodCenter() const {
return lodCenter;
}
void NiLODNode::SetLodCenter( const Vector3 & value ) {
lodCenter = value;
}
vector<LODRange > NiLODNode::GetLodLevels() const {
return lodLevels;
}
void NiLODNode::SetLodLevels( const vector<LODRange >& value ) {
lodLevels = value;
}
Ref<NiLODData > NiLODNode::GetRangeData() const {
return rangeData;
}
void NiLODNode::SetRangeData( Ref<NiLODData > value ) {
rangeData = value;
}
......@@ -36,3 +36,19 @@ const Type & NiRangeLODData::GetType() const {
return TYPE;
};
Vector3 NiRangeLODData::GetLodCenter() const {
return lodCenter;
}
void NiRangeLODData::SetLodCenter( const Vector3 & value ) {
lodCenter = value;
}
vector<LODRange > NiRangeLODData::GetLodLevels() const {
return lodLevels;
}
void NiRangeLODData::SetLodLevels( const vector<LODRange >& value ) {
lodLevels = value;
}
......@@ -35,3 +35,43 @@ const Type & NiScreenLODData::GetType() const {
return TYPE;
};
Vector3 NiScreenLODData::GetBoundCenter() const {
return boundCenter;
}
void NiScreenLODData::SetBoundCenter( const Vector3 & value ) {
boundCenter = value;
}
float NiScreenLODData::GetBoundRadius() const {
return boundRadius;
}
void NiScreenLODData::SetBoundRadius( float value ) {
boundRadius = value;
}
Vector3 NiScreenLODData::GetWorldCenter() const {
return worldCenter;
}
void NiScreenLODData::SetWorldCenter( const Vector3 & value ) {
worldCenter = value;
}
float NiScreenLODData::GetWorldRadius() const {
return worldRadius;
}
void NiScreenLODData::SetWorldRadius( float value ) {
worldRadius = value;
}
vector<float > NiScreenLODData::GetProportionLevels() const {
return proportion;
}
void NiScreenLODData::SetProportionLevels( const vector<float >& value ) {
proportion = value;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment