From ab382224d31410b92c3d3e225064a14efcb633db Mon Sep 17 00:00:00 2001 From: Shon Ferguson <shonferg@users.sourceforge.net> Date: Thu, 12 Apr 2007 07:00:14 +0000 Subject: [PATCH] More documentation for several Oblivion Havok-related objects. --- include/obj/bhkBoxShape.h | 10 +++- include/obj/bhkCapsuleShape.h | 40 ++++++++++++++-- include/obj/bhkEntity.h | 76 ++++++------------------------- include/obj/bhkMultiSphereShape.h | 13 ++++-- include/obj/bhkNiTriStripsShape.h | 20 +++++++- include/obj/bhkSphereRepShape.h | 8 +++- include/obj/bhkSphereShape.h | 8 +++- src/obj/bhkEntity.cpp | 2 +- src/obj/bhkNiTriStripsShape.cpp | 4 +- 9 files changed, 103 insertions(+), 78 deletions(-) diff --git a/include/obj/bhkBoxShape.h b/include/obj/bhkBoxShape.h index 13c081ae..3a67f3ed 100644 --- a/include/obj/bhkBoxShape.h +++ b/include/obj/bhkBoxShape.h @@ -34,10 +34,16 @@ public: NIFLIB_HIDDEN virtual list<NiObjectRef> GetRefs() const; /*! - * Looks like this could be the box size. + * Gets the dimentions of the box. + * \return The dimentions of the bounding box. */ NIFLIB_API Vector3 GetDimensions() const; - NIFLIB_API void SetDimensions( const Vector3& value ); + + /*! + * Sets the dimentions of the box. + * \param The new dimentions for the bounding box. + */ + NIFLIB_API void SetDimensions( const Vector3 & value ); protected: BHK_BOX_SHAPE_MEMBERS diff --git a/include/obj/bhkCapsuleShape.h b/include/obj/bhkCapsuleShape.h index 50f1fc57..3f58d4fa 100644 --- a/include/obj/bhkCapsuleShape.h +++ b/include/obj/bhkCapsuleShape.h @@ -34,33 +34,63 @@ public: NIFLIB_HIDDEN virtual list<NiObjectRef> GetRefs() const; /*! - * Apparently the capsule's radius. + * Gets the capsule's radius. + * \return The radius of the capsule. */ NIFLIB_API float GetRadius() const; + + /*! + * Sets the capsule's radius. + * \param[in] value The new radius for the capsule. + */ NIFLIB_API void SetRadius( float value ); /*! - * First point on the capsule's axis. + * Gets the first point on the capsule's axis. + * \return The first point on the capsule's axis. */ NIFLIB_API Vector3 GetFirstPoint() const; + + /*! + * Sets the first point on the capsule's axis. + * \return The new first point on the capsule's axis. + */ NIFLIB_API void SetFirstPoint( const Vector3 & value ); /*! - * Matches first capsule radius. + * Gets the second capsule radius. Seems to match the first capsule radius. + * \return The second capsule radius. */ NIFLIB_API float GetRadius1() const; + + /*! + * Sets the second capsule radius. Seems to match the first capsule radius. + * \param value[in] The new second capsule radius. + */ NIFLIB_API void SetRadius1( float value ); /*! - * Second point on the capsule's axis. + * Gets the second point on the capsule's axis. + * \return The second point on the capsule's axis. */ NIFLIB_API Vector3 GetSecondPoint() const; + + /*! + * Sets the second point on the capsule's axis. + * \return The new second point on the capsule's axis. + */ NIFLIB_API void SetSecondPoint( const Vector3 & value ); /*! - * Matches second capsule radius. + * Gets the third capsule radius. Seems to match the second capsule radius. + * \return The third capsule radius. */ NIFLIB_API float GetRadius2() const; + + /*! + * Sets the third capsule radius. Seems to match the second capsule radius. + * \param value[in] The new third capsule radius. + */ NIFLIB_API void SetRadius2( float value ); protected: diff --git a/include/obj/bhkEntity.h b/include/obj/bhkEntity.h index ab970b93..6f244acd 100644 --- a/include/obj/bhkEntity.h +++ b/include/obj/bhkEntity.h @@ -39,73 +39,27 @@ public: NIFLIB_HIDDEN virtual list<NiObjectRef> GetRefs() const; /*! - * The body's shape. + * Retrieves the shape object that this body is using. + * \param[in] value The shape object being used by this body. */ NIFLIB_API Ref<bhkShape > GetShape() const; - NIFLIB_API void SetShape( Ref<bhkShape > value ); /*! - * Sets mesh colour in CS. - * 0: Unidentified (white) - * 1: Static (red) - * 2: AnimStatic (magenta) - * 3: Transparent (light pink) - * 4: Clutter (light blue) - * 5: Weapon (orange) - * 6: Projectile (light orange) - * 7: Spell (cyan) - * 8: Biped (green) Seems to apply to all creatures/NPCs - * 9: Trees (light brown) - * 10: Props (magenta) - * 11: Water (cyan) - * 12: Trigger (light grey) - * 13: Terrain (light yellow) - * 14: Trap (light grey) - * 15: NonCollidable (white) - * 16: CloudTrap (greenish grey) - * 17: Ground (none) - * 18: Portal (green) - * 19: Stairs (white) - * 20: CharController (yellow) - * 21: AvoidBox (dark yellow) - * 22: ? (white) - * 23: ? (white) - * 24: CameraPick (white) - * 25: ItemPick (white) - * 26: LineOfSight (white) - * 27: PathPick (white) - * 28: CustomPick1 (white) - * 29: CustomPick2 (white) - * 30: SpellExplosion (white) - * 31: DroppingPick (white) - * 32: Other (white) - * 33: Head - * 34: Body - * 35: Spine1 - * 36: Spine2 - * 37: LUpperArm - * 38: LForeArm - * 39: LHand - * 40: LThigh - * 41: LCalf - * 42: LFoot - * 43: RUpperArm - * 44: RForeArm - * 45: RHand - * 46: RThigh - * 47: RCalf - * 48: RFoot - * 49: Tail - * 50: SideWeapon - * 51: Shield - * 52: Quiver - * 53: BackWeapon - * 54: BackWeapon (?) - * 55: PonyTail - * 56: Wing - * 57+: Null + * Sets the shape object that this body will use. + * \param[in] value The new shape object for this body to use. + */ + NIFLIB_API void SetShape( bhkShape * value ); + + /*! + * Gets the current Oblivion layer, which seems to determine the mesh color displayed by the Oblivion Construction Set. + * \return The current Oblivion Layer. */ NIFLIB_API OblivionLayer GetLayer() const; + + /*! + * Sets the Oblivion layer, which seems to determine the mesh color displayed by the Oblivion Construction Set. + * \param[in] value The new Oblivoin layer to use. + */ NIFLIB_API void SetLayer( OblivionLayer value ); protected: diff --git a/include/obj/bhkMultiSphereShape.h b/include/obj/bhkMultiSphereShape.h index 4d8d870f..1fa49552 100644 --- a/include/obj/bhkMultiSphereShape.h +++ b/include/obj/bhkMultiSphereShape.h @@ -36,10 +36,17 @@ public: NIFLIB_HIDDEN virtual list<NiObjectRef> GetRefs() const; /*! - * This array holds the spheres which make up the multi sphere shape. + * Gets the spheres which make up the multi sphere shape. + * \return The spheres which make up the multi sphere shape. */ - NIFLIB_API vector<Sphere > GetSpheres() const; - NIFLIB_API void SetSpheres( const vector<Sphere >& value ); + NIFLIB_API vector<Sphere> GetSpheres() const; + + /*! + * Sets the spheres which make up the multi sphere shape. + * \param[in] value The new spheres which will make up the multi sphere shape. + */ + + NIFLIB_API void SetSpheres( const vector<Sphere> & value ); protected: BHK_MULTI_SPHERE_SHAPE_MEMBERS diff --git a/include/obj/bhkNiTriStripsShape.h b/include/obj/bhkNiTriStripsShape.h index aed18b63..f7f77dfe 100644 --- a/include/obj/bhkNiTriStripsShape.h +++ b/include/obj/bhkNiTriStripsShape.h @@ -40,13 +40,29 @@ public: NIFLIB_HIDDEN virtual list<NiObjectRef> GetRefs() const; /*! - * Scale. Usually (1.0, 1.0, 1.0). + * Gets the scale. Usually (1.0, 1.0, 1.0). + * \return The scale. */ NIFLIB_API Vector3 GetScale() const; + + /*! + * Sets the scale. Usually (1.0, 1.0, 1.0). + * \param[in] n The new scale. + */ NIFLIB_API void SetScale( const Vector3 & n ); + /*! + * Sets the number of NiTriStripsData objects referenced by this shape. + * \param[in] n The new number of NiTriStripsData objects. + */ NIFLIB_API void SetNumStripsData(int i); - NIFLIB_API void SetStripsData(int i, Ref<NiTriStripsData> &); + + /*! + * Sets the NiTriStripsData object referenced by this shape at the specified index. + * \param[in] index The index at which the given NiTriStripsData object will be referenced. Should be lower than the value set with bhkNiTriStripsShape::SetNumStripsData. + * \param[in] strips The new NiTriStripsData object to be referenced by this shape at the specified index. + */ + NIFLIB_API void SetStripsData( int index, NiTriStripsData * strips ); protected: BHK_NI_TRI_STRIPS_SHAPE_MEMBERS diff --git a/include/obj/bhkSphereRepShape.h b/include/obj/bhkSphereRepShape.h index 8bf34ae1..03dd1cdb 100644 --- a/include/obj/bhkSphereRepShape.h +++ b/include/obj/bhkSphereRepShape.h @@ -35,9 +35,15 @@ public: NIFLIB_HIDDEN virtual list<NiObjectRef> GetRefs() const; /*! - * The shape's material. + * Get the shape's material. This determines the type of noises the object makes as it collides in Oblivion. + * \return The Oblivion material used by this collision shape. */ NIFLIB_API HavokMaterial GetMaterial() const; + + /*! + * Sets the shape's material. This determines the type of noises the object makes as it collides in Oblivion. + * \param[in] value The new material for this shape to use. + */ NIFLIB_API void SetMaterial( HavokMaterial value ); protected: diff --git a/include/obj/bhkSphereShape.h b/include/obj/bhkSphereShape.h index 971d126d..a8cd0cdc 100644 --- a/include/obj/bhkSphereShape.h +++ b/include/obj/bhkSphereShape.h @@ -34,9 +34,15 @@ public: NIFLIB_HIDDEN virtual list<NiObjectRef> GetRefs() const; /*! - * This denotes the radius of the sphere. + * Retrieves the radius of the sphere. + * \return The radius of the sphere. */ NIFLIB_API float GetRadius() const; + + /*! + * Sets a new value for the radius of the sphere. + * \param[in] value The new radius of the sphere. + */ NIFLIB_API void SetRadius( float value ); protected: diff --git a/src/obj/bhkEntity.cpp b/src/obj/bhkEntity.cpp index 39dfe3d0..17c113eb 100644 --- a/src/obj/bhkEntity.cpp +++ b/src/obj/bhkEntity.cpp @@ -40,7 +40,7 @@ Ref<bhkShape > bhkEntity::GetShape() const { return shape; } -void bhkEntity::SetShape( Ref<bhkShape > value ) { +void bhkEntity::SetShape( bhkShape * value ) { shape = value; } diff --git a/src/obj/bhkNiTriStripsShape.cpp b/src/obj/bhkNiTriStripsShape.cpp index 92f80df9..55d4ddea 100644 --- a/src/obj/bhkNiTriStripsShape.cpp +++ b/src/obj/bhkNiTriStripsShape.cpp @@ -49,9 +49,9 @@ void bhkNiTriStripsShape::SetNumStripsData(int n) //TODO: Understand why these are gone and what to do about it } -void bhkNiTriStripsShape::SetStripsData(int i, Ref<NiTriStripsData> &strips) +void bhkNiTriStripsShape::SetStripsData( int index, NiTriStripsData * strips ) { - stripsData[i] = strips; + stripsData[index] = strips; } Vector3 bhkNiTriStripsShape::GetScale() const { -- GitLab