Skip to content

Commit

Permalink
Update documentation for CreateSoftBodyRope (length param changed to …
Browse files Browse the repository at this point in the history
…end)
  • Loading branch information
DrChat committed Jun 11, 2014
1 parent 385c941 commit 089dbe2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions GMVPhy/PhysSoftBody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ int lCreateSoftBodyFromVertices(lua_State *state) {
// Desc: Creates a new soft body rope
// Arg1: PhysEnv|env|The physics environment to create the soft body in
// Arg2: Vector|start|Start position
// Arg3: Vector|length|Rope length
// Arg3: Vector|end|End position
// Arg4: int|resolution|Soft body resolution (# of nodes)
// Ret1: PhysSoftBody|softbody|The rope soft body
//
int lCreateSoftBodyRope(lua_State *state) {
IPhysicsEnvironment32 *pEnv = Get_PhysEnv(state, 1);
Vector *pos = Get_Vector(state, 2);
Vector *length = Get_Vector(state, 3);
Vector *end = Get_Vector(state, 3);
int res = LUA->GetNumber(4);

IPhysicsSoftBody *pSoftBody = pEnv->CreateSoftBodyRope(*pos, *length, res, NULL);
IPhysicsSoftBody *pSoftBody = pEnv->CreateSoftBodyRope(*pos, *end, res, NULL);
if (!pSoftBody)
LUA->ThrowError("Failed to create soft body (environment returned NULL)");

Expand Down
2 changes: 1 addition & 1 deletion include/vphysics_interfaceV32.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ abstract_class IPhysicsEnvironment32 : public IPhysicsEnvironment {
// Create a convex soft body from vertices. Vertices are in world space!
virtual IPhysicsSoftBody * CreateSoftBodyFromVertices(const Vector *vertices, int numVertices, const softbodyparams_t *pParams) = 0;
// Resolution is the amount of nodes in the rope. Higher number means less passthrough and a finer rope.
virtual IPhysicsSoftBody * CreateSoftBodyRope(const Vector &start, const Vector &length, int resolution, const softbodyparams_t *pParams) = 0;
virtual IPhysicsSoftBody * CreateSoftBodyRope(const Vector &start, const Vector &end, int resolution, const softbodyparams_t *pParams) = 0;
virtual IPhysicsSoftBody * CreateSoftBodyPatch(const Vector *corners, int resx, int resy, const softbodyparams_t *pParams) = 0;
virtual void DestroySoftBody(IPhysicsSoftBody *pSoftBody) = 0;

Expand Down

0 comments on commit 089dbe2

Please sign in to comment.