Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nifplg
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
nifplg
Commits
51d83757
Commit
51d83757
authored
18 years ago
by
Gundalf
Browse files
Options
Downloads
Patches
Plain Diff
forgot to commit
parent
ebc2da46
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NifPlugins.cpp
+15
-14
15 additions, 14 deletions
NifPlugins.cpp
NifPlugins.h
+31
-11
31 additions, 11 deletions
NifPlugins.h
with
46 additions
and
25 deletions
NifPlugins.cpp
+
15
−
14
View file @
51d83757
#include
"Max.h"
#include
"NifPlugins.h"
bool
i
sCollision
(
INode
*
node
)
bool
npI
sCollision
(
INode
*
node
)
{
BOOL
b
;
return
n
ode
&&
node
->
GetUserPropBool
(
_T
(
NP_PRO
P_HASCOLL
)
,
b
)
&&
b
;
int
i
;
return
n
pGetProp
(
node
,
N
P_HASCOLL
,
i
)
&&
i
;
}
void
s
etCollision
(
INode
*
node
,
bool
coll
)
void
npS
etCollision
(
INode
*
node
,
bool
coll
)
{
if
(
node
)
node
->
SetUserPropBool
(
_T
(
NP_PROP_HASCOLL
),
coll
);
npSetProp
(
node
,
NP_HASCOLL
,
(
bool
)
coll
);
}
bool
getHvkLayer
(
INode
*
node
,
int
&
layer
)
bool
npGetProp
(
INode
*
node
,
const
TSTR
&
prop
,
int
&
value
)
{
return
node
&&
node
->
GetUserPropInt
(
_T
(
NP_PROP_HVK_LAYER
),
layer
);
return
node
&&
node
->
GetUserPropInt
(
prop
,
value
);
}
void
setHvkLayer
(
INode
*
node
,
int
layer
)
void
npSetProp
(
INode
*
node
,
const
TSTR
&
prop
,
int
value
)
{
if
(
node
)
node
->
SetUserPropInt
(
_T
(
NP_PROP_HVK_LAYER
),
layer
);
node
->
SetUserPropInt
(
prop
,
value
);
}
bool
getHvkMaterial
(
INode
*
node
,
int
&
mtl
)
bool
npGetProp
(
INode
*
node
,
const
TSTR
&
prop
,
float
&
value
)
{
return
node
&&
node
->
GetUserProp
Int
(
_T
(
NP_PROP_HVK_MATERIAL
),
mtl
);
return
node
&&
node
->
GetUserProp
Float
(
prop
,
value
);
}
void
setHvkMaterial
(
INode
*
node
,
int
mtl
)
void
npSetProp
(
INode
*
node
,
const
TSTR
&
prop
,
float
value
)
{
if
(
node
)
node
->
SetUserProp
Int
(
_T
(
NP_PROP_HVK_MATERIAL
),
mtl
);
node
->
SetUserProp
Float
(
prop
,
value
);
}
This diff is collapsed.
Click to expand it.
NifPlugins.h
+
31
−
11
View file @
51d83757
#ifndef __NIFPLUGINS_H__
#define __NIFPLUGINS_H__
#define NP_PROP_HASCOLL "np_coll"
#define NP_PROP_HVK_LAYER "np_hvk_layer"
#define NP_PROP_HVK_MATERIAL "np_hvk_mtl"
#define NP_HASCOLL _T("np_coll")
#define NP_HVK_LAYER _T("np_hvk_layer")
#define NP_HVK_MATERIAL _T("np_hvk_mtl")
#define NP_HVK_MASS _T("np_hvk_mass")
#define NP_HVK_LINEAR_DAMPING _T("np_hvk_ldamp")
#define NP_HVK_ANGULAR_DAMPING _T("np_hvk_adamp")
#define NP_HVK_FRICTION _T("np_hvk_frict")
#define NP_HVK_RESTITUTION _T("np_hvk_resti")
#define NP_HVK_MAX_LINEAR_VELOCITY _T("np_hvk_max_lvel")
#define NP_HVK_MAX_ANGULAR_VELOCITY _T("np_hvk_max_avel")
#define NP_HVK_PENETRATION_DEPTH _T("np_hvk_pdepth")
#define NP_HVK_MOTION_SYSTEM _T("np_hvk_msys")
#define NP_HVK_QUALITY_TYPE _T("np_hvk_qtype")
#define NP_DEFAULT_HVK_MATERIAL 9
#define NP_DEFAULT_HVK_LAYER 1
#define NP_DEFAULT_HVK_MATERIAL 9
#define NP_DEFAULT_HVK_LAYER 1
#define NP_DEFAULT_HVK_MASS 0
#define NP_DEFAULT_HVK_LINEAR_DAMPING 0.1f
#define NP_DEFAULT_HVK_ANGULAR_DAMPING 0.05f
#define NP_DEFAULT_HVK_FRICTION 0.3f
#define NP_DEFAULT_HVK_RESTITUTION 0.3f
#define NP_DEFAULT_HVK_MAX_LINEAR_VELOCITY 250.0f
#define NP_DEFAULT_HVK_MAX_ANGULAR_VELOCITY 31.4159f
#define NP_DEFAULT_HVK_PENETRATION_DEPTH 0.15f
#define NP_DEFAULT_HVK_MOTION_SYSTEM 7
#define NP_DEFAULT_HVK_QUALITY_TYPE 1
bool
i
sCollision
(
INode
*
node
);
void
s
etCollision
(
INode
*
node
,
bool
coll
);
bool
npI
sCollision
(
INode
*
node
);
void
npS
etCollision
(
INode
*
node
,
bool
coll
);
bool
getHvkLayer
(
INode
*
node
,
int
&
layer
);
void
setHvkLayer
(
INode
*
node
,
int
layer
);
bool
npGetProp
(
INode
*
node
,
const
TSTR
&
prop
,
int
&
value
);
void
npSetProp
(
INode
*
node
,
const
TSTR
&
prop
,
int
value
);
bool
getHvkMaterial
(
INode
*
node
,
int
&
mtl
);
void
setHvkMaterial
(
INode
*
node
,
int
mtl
);
bool
npGetProp
(
INode
*
node
,
const
TSTR
&
prop
,
float
&
value
);
void
npSetProp
(
INode
*
node
,
const
TSTR
&
prop
,
float
value
);
#endif // __NIFPLUGINS_H__
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