23void PhysxForceFieldDesc::
24set_name(
const char *name) {
26 _name = name ? name :
"";
27 _desc.name = _name.c_str();
33void PhysxForceFieldDesc::
34set_pos(
const LPoint3f &pos) {
42void PhysxForceFieldDesc::
43set_mat(
const LMatrix4f &mat) {
51void PhysxForceFieldDesc::
52set_hpr(
float h,
float p,
float r) {
58 q.set_hpr(LVector3f(h, p, r));
59 q.extract_to_matrix(rot);
67void PhysxForceFieldDesc::
68set_kernel_constant(
const LVector3f &constant) {
76void PhysxForceFieldDesc::
77set_kernel_position_target(
const LPoint3f &target) {
85void PhysxForceFieldDesc::
86set_kernel_velocity_target(
const LVector3f &target) {
94void PhysxForceFieldDesc::
95set_kernel_torus_radius(
float radius) {
97 _kernel.torusRadius = radius;
103void PhysxForceFieldDesc::
104set_kernel_falloff_linear(
const LVector3f &falloff) {
112void PhysxForceFieldDesc::
113set_kernel_falloff_quadratic(
const LVector3f &falloff) {
121void PhysxForceFieldDesc::
122set_kernel_noise(
const LVector3f &noise) {
130void PhysxForceFieldDesc::
131set_kernel_position_multiplier(
const LMatrix3f &multiplier) {
139void PhysxForceFieldDesc::
140set_kernel_velocity_multiplier(
const LMatrix3f &multiplier) {
148void PhysxForceFieldDesc::
149create_kernel(NxScene *scenePtr) {
151 _desc.kernel = scenePtr->createForceFieldLinearKernel(_kernel);
157void PhysxForceFieldDesc::
158set_coordinates(PhysxForceFieldCoordinates coordinates) {
160 _desc.coordinates = (NxForceFieldCoordinates) coordinates;
166void PhysxForceFieldDesc::
169 _desc.includeGroupShapes.push_back(desc.ptr());
175void PhysxForceFieldDesc::
178 _desc.shapeGroups.push_back(group->ptr());
184void PhysxForceFieldDesc::
187 _desc.actor = actor->ptr();
Actors are the main simulation objects.
Abstract base class for descriptors for force field shapes descriptors.
static NxVec3 vec3_to_nxVec3(const LVector3f &v)
Converts from LVector3f to NxVec3.
static NxVec3 point3_to_nxVec3(const LPoint3f &p)
Converts from LPoint3f to NxVec3.
static NxMat34 mat4_to_nxMat34(const LMatrix4f &m)
Converts from LMatrix4f to NxMat34.
static NxMat33 mat3_to_nxMat33(const LMatrix3f &m)
Converts from LMatrix3f to NxMat33.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.