15 #include "physxForceFieldDesc.h"
16 #include "physxForceFieldShapeDesc.h"
17 #include "physxForceFieldShapeGroup.h"
18 #include "physxManager.h"
19 #include "physxActor.h"
26 void PhysxForceFieldDesc::
27 set_name(
const char *name) {
29 _name = name ? name :
"";
30 _desc.name = _name.c_str();
38 void PhysxForceFieldDesc::
49 void PhysxForceFieldDesc::
60 void PhysxForceFieldDesc::
61 set_hpr(
float h,
float p,
float r) {
78 void PhysxForceFieldDesc::
79 set_kernel_constant(
const LVector3f &constant) {
89 void PhysxForceFieldDesc::
90 set_kernel_position_target(
const LPoint3f &target) {
100 void PhysxForceFieldDesc::
101 set_kernel_velocity_target(
const LVector3f &target) {
111 void PhysxForceFieldDesc::
112 set_kernel_torus_radius(
float radius) {
114 _kernel.torusRadius = radius;
122 void PhysxForceFieldDesc::
123 set_kernel_falloff_linear(
const LVector3f &falloff) {
133 void PhysxForceFieldDesc::
134 set_kernel_falloff_quadratic(
const LVector3f &falloff) {
144 void PhysxForceFieldDesc::
145 set_kernel_noise(
const LVector3f &noise) {
155 void PhysxForceFieldDesc::
156 set_kernel_position_multiplier(
const LMatrix3f &multiplier) {
166 void PhysxForceFieldDesc::
167 set_kernel_velocity_multiplier(
const LMatrix3f &multiplier) {
177 void PhysxForceFieldDesc::
178 create_kernel(NxScene *scenePtr) {
180 _desc.kernel = scenePtr->createForceFieldLinearKernel(_kernel);
188 void PhysxForceFieldDesc::
189 set_coordinates(PhysxForceFieldCoordinates coordinates) {
191 _desc.coordinates = (NxForceFieldCoordinates) coordinates;
199 void PhysxForceFieldDesc::
202 _desc.includeGroupShapes.push_back(desc.ptr());
210 void PhysxForceFieldDesc::
213 _desc.shapeGroups.push_back(group->ptr());
221 void PhysxForceFieldDesc::
224 _desc.actor = actor->ptr();
Abstract base class for descriptors for force field shapes descriptors.
static NxVec3 point3_to_nxVec3(const LPoint3f &p)
Converts from LPoint3f to NxVec3.
void extract_to_matrix(LMatrix3f &m) const
Based on the quat lib from VRPN.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
static NxMat34 mat4_to_nxMat34(const LMatrix4f &m)
Converts from LMatrix4f to NxMat34.
This is a 4-by-4 transform matrix.
static NxVec3 vec3_to_nxVec3(const LVector3f &v)
Converts from LVector3f to NxVec3.
static NxMat33 mat3_to_nxMat33(const LMatrix3f &m)
Converts from LMatrix3f to NxMat33.
Actors are the main simulation objects.
void set_hpr(const LVecBase3f &hpr, CoordinateSystem cs=CS_default)
Sets the quaternion as the unit quaternion that is equivalent to these Euler angles.
This is the base quaternion class.
This is a 3-by-3 transform matrix.