diff --git a/include/obj/NiAlphaProperty.h b/include/obj/NiAlphaProperty.h index 43ee9777ac7258e87b4bb188f65491ba39318319..758154e144d6322c390eaff0b06cf5b1703a8654 100644 --- a/include/obj/NiAlphaProperty.h +++ b/include/obj/NiAlphaProperty.h @@ -33,28 +33,28 @@ public: NIFLIB_HIDDEN virtual list<NiObjectRef> GetRefs() const; enum BlendMode { - BM_ONE = 0x00, - BM_ZERO = 0x01, - BM_SRC_COLOR = 0x02, - BM_ONE_MINUS_SRC_COLOR = 0x03, - BM_DST_COLOR = 0x04, - BM_ONE_MINUS_DST_COLOR = 0x05, - BM_SRC_ALPHA = 0x06, - BM_ONE_MINUS_SRC_ALPHA = 0x07, - BM_DST_ALPHA = 0x08, - BM_ONE_MINUS_DST_ALPHA = 0x08, - BM_SRC_ALPHA_SATURATE = 0x09, + BM_ONE = 0x00, + BM_ZERO = 0x01, + BM_SRC_COLOR = 0x02, + BM_ONE_MINUS_SRC_COLOR = 0x03, + BM_DST_COLOR = 0x04, + BM_ONE_MINUS_DST_COLOR = 0x05, + BM_SRC_ALPHA = 0x06, + BM_ONE_MINUS_SRC_ALPHA = 0x07, + BM_DST_ALPHA = 0x08, + BM_ONE_MINUS_DST_ALPHA = 0x08, + BM_SRC_ALPHA_SATURATE = 0x09, }; enum TestMode { - TM_ALWAYS = 0x00, - TM_LESS = 0x01, - TM_EQUAL = 0x02, - TM_LEQUAL = 0x03, - TM_GREATER = 0x04, - TM_NOTEQUAL = 0x05, - TM_GEQUAL = 0x06, - TM_NEVER = 0x07, + TM_ALWAYS = 0x00, + TM_LESS = 0x01, + TM_EQUAL = 0x02, + TM_LEQUAL = 0x03, + TM_GREATER = 0x04, + TM_NOTEQUAL = 0x05, + TM_GEQUAL = 0x06, + TM_NEVER = 0x07, }; NIFLIB_API BlendMode GetSourceBlendMode() const; @@ -75,7 +75,16 @@ public: NIFLIB_API bool GetAlphaSort() const; NIFLIB_API void SetAlphaSort(bool value); + /*! + * Can be used to get the data stored in the flags field for this object. It is usually better to call more specific flag-toggle functions if they are availiable. + * \return The flag data. + */ NIFLIB_API unsigned short GetFlags() const; + + /*! + * Can be used to set the data stored in the flags field for this object. It is usually better to call more specific flag-toggle functions if they are availiable. + * \param[in] n The new flag data. Will overwrite any existing flag data. + */ NIFLIB_API void SetFlags( unsigned short n ); NIFLIB_API byte GetAlphaTestThreshold() const; diff --git a/include/obj/NiBillboardNode.h b/include/obj/NiBillboardNode.h index 3a0bdf44ab6383bf90c7c7af6981792fd211a8f0..635ad83113d87ce38318eddcb3f1f2f2f8b50b8a 100644 --- a/include/obj/NiBillboardNode.h +++ b/include/obj/NiBillboardNode.h @@ -35,10 +35,15 @@ public: NIFLIB_HIDDEN virtual list<NiObjectRef> GetRefs() const; /*! - * 0: ALWAYS_FACE_CAMERA 1: ROTATE_ABOUT_UP 2: RIGID_FACE_CAMERA 3: - * ALWAYS_FACE_CENTER 4: RIGID_FACE_CENTER + * Retreives the current bilboard mode of this bilboard node. This determines how it will cause the node to face the camera. + * \return The current bilboard mode. */ NIFLIB_API BillboardMode GetBillboardMode() const; + + /*! + * Sets the bilboard mode of this bilboard node. This determines how it will cause the node to face the camera. + * \param[in] value The new bilboard mode. + */ NIFLIB_API void SetBillboardMode( BillboardMode value ); protected: diff --git a/include/obj/NiLODNode.h b/include/obj/NiLODNode.h index 41dbb60c66483ba8a77e812da848e61f8076c6aa..0930d12c1da708274c94169b7adfba09ccfe382b 100644 --- a/include/obj/NiLODNode.h +++ b/include/obj/NiLODNode.h @@ -43,31 +43,37 @@ public: /*! * Get the point to calculate distance from for switching? + * \return The LOD center. */ NIFLIB_API Vector3 GetLODCenter() const; /*! * Set the point to calculate distance from for switching? + * \param[in] value The new LOD center. */ NIFLIB_API void SetLODCenter( const Vector3 & value ); /*! * Get the ranges of distance that each level of detail applies in. + * \return The LOD levels. */ NIFLIB_API vector<LODRange > GetLODLevels() const; /*! * Set the ranges of distance that each level of detail applies in. + * \param[in] value The new LOD levels. */ NIFLIB_API void SetLODLevels( const vector<LODRange >& value ); /*! - * Get the data object that refers to LOD level information + * Get the data object that refers to LOD level information. + * \return The LOD level data object or NULL if there is none. */ NIFLIB_API Ref<NiLODData > GetLODLevelData() const; /*! - * Set the data object that refers to LOD level information + * Set the data object that refers to LOD level information. + * \param[in] The new LOD level data object or NULL to clear the current one. */ NIFLIB_API void SetLODLevelData( Ref<NiLODData > value ); diff --git a/include/obj/NiNode.h b/include/obj/NiNode.h index 6da1067be8b4d2fb574ea8853b82d05673826506..98bd9e1cc9b04b00508f788e634c0bf814e73c12 100644 --- a/include/obj/NiNode.h +++ b/include/obj/NiNode.h @@ -52,9 +52,27 @@ public: } #endif - NIFLIB_API void AddEffect( Ref<NiDynamicEffect> effect ); - NIFLIB_API void RemoveEffect( Ref<NiDynamicEffect> effect ); + /*! + * Adds a dynamic effect to this node. This is usually a light, but can also be a texture effect or something else. Can affect nodes further down the scene graph from this one as well. + * \param[in] effect The new dynamic effect to add to this node. + */ + NIFLIB_API void AddEffect( NiDynamicEffect * effect ); + + /*! + * Removes a dynamic effect to this node. This is usually a light, but can also be a texture effect or something else. Can affect nodes further down the scene graph from this one as well. + * \param[in] effect The dynamic effect to remove from this node. + */ + NIFLIB_API void RemoveEffect( NiDynamicEffect * effect ); + + /*! + * Removes all dynamic effects from this node. These is usually lights, but can also be a texture effects or something else. Can affect nodes further down the scene graph from this one as well. + */ NIFLIB_API void ClearEffects(); + + /*! + * Retrieves all the dynamic effects attached to this node. This is usually a light, but can also be a texture effect or something else. Can affect nodes further down the scene graph from this one as well. + * \return The dynamic effects attached to this node. + */ NIFLIB_API vector< Ref<NiDynamicEffect> > GetEffects() const; /*! Checks if this node has any skins attached. */ @@ -85,19 +103,18 @@ public: NIFLIB_API void PropagateTransform(); /*! - * Should only be called by NiTriBasedGeom - * Adds a new SkinInstance to the specified mesh. - * The bones must be below this node in the scene graph tree + * NIFLIB_HIDDEN function. For internal use only. + * Should only be called by NiTriBasedGeom. Adds a new SkinInstance to the specified mesh. The bones must be below this node in the scene graph tree */ NIFLIB_HIDDEN void AddSkin( NiSkinInstance * skin_inst ); /*! - * Should only be called by NiTriBasedGeom - * Detaches the skin associated with a child mesh. + * NIFLIB_HIDDEN function. For internal use only. + * Should only be called by NiTriBasedGeom. Detaches the skin associated with a child mesh. */ NIFLIB_HIDDEN void RemoveSkin( NiSkinInstance * skin_inst ); - /*! Should not be called directly */ + /*! NIFLIB_HIDDEN function. For internal use only. */ NIFLIB_HIDDEN void SetSkinFlag( bool n ); private: diff --git a/src/obj/NiNode.cpp b/src/obj/NiNode.cpp index 2641716e318675d7a71626828c45d0fad8e4be24..024adacccba69fc7c83a8d3b17c14413836e5ad6 100644 --- a/src/obj/NiNode.cpp +++ b/src/obj/NiNode.cpp @@ -117,12 +117,12 @@ vector< Ref<NiAVObject> > NiNode::GetChildren() const { } -void NiNode::AddEffect( Ref<NiDynamicEffect> obj ) { +void NiNode::AddEffect( NiDynamicEffect * obj ) { obj->SetParent( this ); effects.push_back( obj ); } -void NiNode::RemoveEffect( Ref<NiDynamicEffect> obj ) { +void NiNode::RemoveEffect( NiDynamicEffect * obj ) { //Search Effect list for the one to remove for ( vector< NiDynamicEffectRef >::iterator it = effects.begin(); it != effects.end(); ) { if ( *it == obj ) {