Fix PhysX compile error

This commit is contained in:
rdb 2016-03-16 10:32:47 +01:00
parent 6b8f78c9e0
commit 2ee977dd3e
2 changed files with 32 additions and 8 deletions

View File

@ -535,16 +535,10 @@ get_hard_stretch_limitation_factor() const {
#endif // NX_SDK_VERSION_NUMBER > 281 #endif // NX_SDK_VERSION_NUMBER > 281
/*
/** /**
* Attaches a cloth vertex to a position in world space. * Attaches a cloth vertex to a position in world space.
*/ */
/*
void PhysxSoftBody:: void PhysxSoftBody::
attach_vertex_to_global_pos(unsigned int vertexId, LPoint3f const &pos) { attach_vertex_to_global_pos(unsigned int vertexId, LPoint3f const &pos) {
@ -553,6 +547,7 @@ attach_vertex_to_global_pos(unsigned int vertexId, LPoint3f const &pos) {
_ptr->attachVertexToGlobalPosition(vertexId, PhysxManager::point3_to_nxVec3(pos)); _ptr->attachVertexToGlobalPosition(vertexId, PhysxManager::point3_to_nxVec3(pos));
} }
*/
/** /**
* Attaches the cloth to a shape. All cloth points currently inside the shape * Attaches the cloth to a shape. All cloth points currently inside the shape
@ -561,6 +556,7 @@ attach_vertex_to_global_pos(unsigned int vertexId, LPoint3f const &pos) {
* This method only works with primitive and convex shapes. Since the inside * This method only works with primitive and convex shapes. Since the inside
* of a general triangle mesh is not clearly defined. * of a general triangle mesh is not clearly defined.
*/ */
/*
void PhysxSoftBody:: void PhysxSoftBody::
attach_to_shape(PhysxShape *shape) { attach_to_shape(PhysxShape *shape) {
@ -570,6 +566,7 @@ attach_to_shape(PhysxShape *shape) {
NxU32 attachmentFlags = 0; // --TODO-- NxU32 attachmentFlags = 0; // --TODO--
_ptr->attachToShape(shape->ptr(), attachmentFlags); _ptr->attachToShape(shape->ptr(), attachmentFlags);
} }
*/
/** /**
* Attaches the cloth to all shapes, currently colliding. * Attaches the cloth to all shapes, currently colliding.
@ -577,6 +574,7 @@ attach_to_shape(PhysxShape *shape) {
* This method only works with primitive and convex shapes. Since the inside * This method only works with primitive and convex shapes. Since the inside
* of a general triangle mesh is not clearly defined. * of a general triangle mesh is not clearly defined.
*/ */
/*
void PhysxSoftBody:: void PhysxSoftBody::
attach_to_colliding_shapes() { attach_to_colliding_shapes() {
@ -585,6 +583,7 @@ attach_to_colliding_shapes() {
NxU32 attachmentFlags = 0; // --TODO-- NxU32 attachmentFlags = 0; // --TODO--
_ptr->attachToCollidingShapes(attachmentFlags); _ptr->attachToCollidingShapes(attachmentFlags);
} }
*/
/** /**
* Detaches the cloth from a shape it has been attached to before. * Detaches the cloth from a shape it has been attached to before.
@ -592,6 +591,7 @@ attach_to_colliding_shapes() {
* If the cloth has not been attached to the shape before, the call has no * If the cloth has not been attached to the shape before, the call has no
* effect. * effect.
*/ */
/*
void PhysxSoftBody:: void PhysxSoftBody::
detach_from_shape(PhysxShape *shape) { detach_from_shape(PhysxShape *shape) {
@ -600,20 +600,24 @@ detach_from_shape(PhysxShape *shape) {
_ptr->detachFromShape(shape->ptr()); _ptr->detachFromShape(shape->ptr());
} }
*/
/** /**
* Frees a previously attached cloth point. * Frees a previously attached cloth point.
*/ */
/*
void PhysxSoftBody:: void PhysxSoftBody::
free_vertex(unsigned int vertexId) { free_vertex(unsigned int vertexId) {
nassertv(_error_type == ET_ok); nassertv(_error_type == ET_ok);
_ptr->freeVertex(vertexId); _ptr->freeVertex(vertexId);
} }
*/
/** /**
* Attaches a cloth vertex to a local position within a shape. * Attaches a cloth vertex to a local position within a shape.
*/ */
/*
void PhysxSoftBody:: void PhysxSoftBody::
attach_vertex_to_shape(unsigned int vertexId, PhysxShape *shape, LPoint3f const &localPos) { attach_vertex_to_shape(unsigned int vertexId, PhysxShape *shape, LPoint3f const &localPos) {
@ -626,10 +630,12 @@ attach_vertex_to_shape(unsigned int vertexId, PhysxShape *shape, LPoint3f const
PhysxManager::point3_to_nxVec3(localPos), PhysxManager::point3_to_nxVec3(localPos),
attachmentFlags); attachmentFlags);
} }
*/
/** /**
* Return the attachment status of the given vertex. * Return the attachment status of the given vertex.
*/ */
/*
PhysxEnums::PhysxVertexAttachmentStatus PhysxSoftBody:: PhysxEnums::PhysxVertexAttachmentStatus PhysxSoftBody::
get_vertex_attachment_status(unsigned int vertexId) const { get_vertex_attachment_status(unsigned int vertexId) const {
@ -638,12 +644,14 @@ get_vertex_attachment_status(unsigned int vertexId) const {
return (PhysxVertexAttachmentStatus) _ptr->getVertexAttachmentStatus(vertexId); return (PhysxVertexAttachmentStatus) _ptr->getVertexAttachmentStatus(vertexId);
} }
*/
/** /**
* Returns the pointer to an attached shape pointer of the given vertex. If * Returns the pointer to an attached shape pointer of the given vertex. If
* the vertex is not attached or attached to a global position, NULL is * the vertex is not attached or attached to a global position, NULL is
* returned. * returned.
*/ */
/*
PhysxShape *PhysxSoftBody:: PhysxShape *PhysxSoftBody::
get_vertex_attachment_shape(unsigned int vertexId) const { get_vertex_attachment_shape(unsigned int vertexId) const {
@ -655,12 +663,14 @@ get_vertex_attachment_shape(unsigned int vertexId) const {
return shape; return shape;
} }
*/
/** /**
* Returns the attachment position of the given vertex. If the vertex is * Returns the attachment position of the given vertex. If the vertex is
* attached to shape, the position local to the shape's pose is returned. If * attached to shape, the position local to the shape's pose is returned. If
* the vertex is not attached, the return value is undefined. * the vertex is not attached, the return value is undefined.
*/ */
/*
LPoint3f PhysxSoftBody:: LPoint3f PhysxSoftBody::
get_vertex_attachment_pos(unsigned int vertexId) const { get_vertex_attachment_pos(unsigned int vertexId) const {
@ -670,11 +680,13 @@ get_vertex_attachment_pos(unsigned int vertexId) const {
return PhysxManager::nxVec3_to_point3(_ptr->getVertexAttachmentPosition(vertexId)); return PhysxManager::nxVec3_to_point3(_ptr->getVertexAttachmentPosition(vertexId));
} }
*/
/** /**
* Sets an external acceleration which affects all non attached particles of * Sets an external acceleration which affects all non attached particles of
* the cloth. * the cloth.
*/ */
/*
void PhysxSoftBody:: void PhysxSoftBody::
set_external_acceleration(LVector3f const &acceleration) { set_external_acceleration(LVector3f const &acceleration) {
@ -683,10 +695,12 @@ set_external_acceleration(LVector3f const &acceleration) {
_ptr->setExternalAcceleration(PhysxManager::vec3_to_nxVec3(acceleration)); _ptr->setExternalAcceleration(PhysxManager::vec3_to_nxVec3(acceleration));
} }
*/
/** /**
* Sets an acceleration acting normal to the cloth surface at each vertex. * Sets an acceleration acting normal to the cloth surface at each vertex.
*/ */
/*
void PhysxSoftBody:: void PhysxSoftBody::
set_wind_acceleration(LVector3f const &acceleration) { set_wind_acceleration(LVector3f const &acceleration) {
@ -695,33 +709,39 @@ set_wind_acceleration(LVector3f const &acceleration) {
_ptr->setWindAcceleration(PhysxManager::vec3_to_nxVec3(acceleration)); _ptr->setWindAcceleration(PhysxManager::vec3_to_nxVec3(acceleration));
} }
*/
/** /**
* Retrieves the external acceleration which affects all non attached * Retrieves the external acceleration which affects all non attached
* particles of the cloth. * particles of the cloth.
*/ */
/*
LVector3f PhysxSoftBody:: LVector3f PhysxSoftBody::
get_external_acceleration() const { get_external_acceleration() const {
nassertr(_error_type == ET_ok, LVector3f::zero()); nassertr(_error_type == ET_ok, LVector3f::zero());
return PhysxManager::nxVec3_to_vec3(_ptr->getExternalAcceleration()); return PhysxManager::nxVec3_to_vec3(_ptr->getExternalAcceleration());
} }
*/
/** /**
* Retrieves the acceleration acting normal to the cloth surface at each * Retrieves the acceleration acting normal to the cloth surface at each
* vertex * vertex
*/ */
/*
LVector3f PhysxSoftBody:: LVector3f PhysxSoftBody::
get_wind_acceleration() const { get_wind_acceleration() const {
nassertr(_error_type == ET_ok, LVector3f::zero()); nassertr(_error_type == ET_ok, LVector3f::zero());
return PhysxManager::nxVec3_to_vec3(_ptr->getWindAcceleration()); return PhysxManager::nxVec3_to_vec3(_ptr->getWindAcceleration());
} }
*/
/** /**
* Applies a force (or impulse) defined in the global coordinate frame, to a * Applies a force (or impulse) defined in the global coordinate frame, to a
* particular vertex of the cloth. * particular vertex of the cloth.
*/ */
/*
void PhysxSoftBody:: void PhysxSoftBody::
add_force_at_vertex(LVector3f const &force, int vertexId, PhysxForceMode mode) { add_force_at_vertex(LVector3f const &force, int vertexId, PhysxForceMode mode) {
@ -730,11 +750,13 @@ add_force_at_vertex(LVector3f const &force, int vertexId, PhysxForceMode mode) {
vertexId, vertexId,
(NxForceMode) mode); (NxForceMode) mode);
} }
*/
/** /**
* Applies a radial force (or impulse) at a particular position. All vertices * Applies a radial force (or impulse) at a particular position. All vertices
* within radius will be affected with a quadratic drop-off. * within radius will be affected with a quadratic drop-off.
*/ */
/*
void PhysxSoftBody:: void PhysxSoftBody::
add_force_at_pos(LPoint3f const &pos, float magnitude, float radius, PhysxForceMode mode) { add_force_at_pos(LPoint3f const &pos, float magnitude, float radius, PhysxForceMode mode) {
@ -744,11 +766,13 @@ add_force_at_pos(LPoint3f const &pos, float magnitude, float radius, PhysxForceM
radius, radius,
(NxForceMode) mode); (NxForceMode) mode);
} }
*/
/** /**
* Applies a directed force (or impulse) at a particular position. All * Applies a directed force (or impulse) at a particular position. All
* vertices within radius will be affected with a quadratic drop-off. * vertices within radius will be affected with a quadratic drop-off.
*/ */
/*
void PhysxSoftBody:: void PhysxSoftBody::
add_directed_force_at_pos(LPoint3f const &pos, LVector3f const &force, float radius, PhysxForceMode mode) { add_directed_force_at_pos(LPoint3f const &pos, LVector3f const &force, float radius, PhysxForceMode mode) {

View File

@ -317,11 +317,11 @@ get_solver_iterations() const {
return _desc.solverIterations; return _desc.solverIterations;
} }
/*
/** /**
* Used by PhysScene to query the sizes of arrays to allocate for the user * Used by PhysScene to query the sizes of arrays to allocate for the user
* buffers in PhysxSoftBodyNode. * buffers in PhysxSoftBodyNode.
*/ */
/*
void PhysxSoftBodyDesc:: void PhysxSoftBodyDesc::
get_mesh_numbers(NxU32 &numVertices, NxU32 &numTriangles) { get_mesh_numbers(NxU32 &numVertices, NxU32 &numTriangles) {