Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Niflib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grant Kim
Niflib
Commits
fc6bf0d4
Commit
fc6bf0d4
authored
13 years ago
by
LogicDragon
Browse files
Options
Downloads
Patches
Plain Diff
Added AddEntity, RemoveEntity, ClearEntities, GetEntities to bhkConstraint
parent
dd61b979
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/obj/bhkConstraint.h
+21
-0
21 additions, 0 deletions
include/obj/bhkConstraint.h
src/obj/bhkConstraint.cpp
+24
-0
24 additions, 0 deletions
src/obj/bhkConstraint.cpp
with
45 additions
and
0 deletions
include/obj/bhkConstraint.h
+
21
−
0
View file @
fc6bf0d4
...
...
@@ -55,6 +55,27 @@ public:
NIFLIB_API
virtual
const
Type
&
GetType
()
const
;
//--BEGIN MISC CUSTOM CODE--//
/*!
* Adds an entity to this bhkConstraint.
*/
NIFLIB_API
void
AddEntity
(
bhkEntity
*
obj
);
/*!
* Removes an entity from this bhkConstraint.
*/
NIFLIB_API
void
RemoveEntity
(
bhkEntity
*
obj
);
/*!
* Removes all entities from this bhkConstraint.
*/
NIFLIB_API
void
ClearEntities
();
/*!
* Retrieves all the entities attached to this bhkConstraint.
*/
NIFLIB_API
vector
<
bhkEntity
*
>
GetEntities
()
const
;
//--END CUSTOM CODE--//
protected:
/*! Number of bodies affected by this constraint. */
...
...
This diff is collapsed.
Click to expand it.
src/obj/bhkConstraint.cpp
+
24
−
0
View file @
fc6bf0d4
...
...
@@ -145,4 +145,28 @@ std::list<NiObject *> bhkConstraint::GetPtrs() const {
}
//--BEGIN MISC CUSTOM CODE--//
void
bhkConstraint
::
AddEntity
(
bhkEntity
*
obj
)
{
entities
.
push_back
(
obj
);
}
void
bhkConstraint
::
RemoveEntity
(
bhkEntity
*
obj
)
{
//Search Effect list for the one to remove
for
(
vector
<
bhkEntity
*
>::
iterator
it
=
entities
.
begin
();
it
!=
entities
.
end
();
)
{
if
(
*
it
==
obj
)
{
it
=
entities
.
erase
(
it
);
}
else
{
++
it
;
}
}
}
void
bhkConstraint
::
ClearEntities
()
{
entities
.
clear
();
}
vector
<
bhkEntity
*
>
bhkConstraint
::
GetEntities
()
const
{
return
entities
;
}
//--END CUSTOM CODE--//
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment