Skip to content
Snippets Groups Projects
Commit 878de748 authored by Shon Ferguson's avatar Shon Ferguson
Browse files

Some more documentation.

parent 15a03068
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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:
......
......@@ -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 );
......
......@@ -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:
......
......@@ -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 ) {
......
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