23 void PhysxForceFieldDesc::
24 set_name(
const char *name) {
26 _name = name ? name :
"";
27 _desc.name = _name.c_str();
33 void PhysxForceFieldDesc::
34 set_pos(
const LPoint3f &pos) {
42 void PhysxForceFieldDesc::
43 set_mat(
const LMatrix4f &mat) {
51 void PhysxForceFieldDesc::
52 set_hpr(
float h,
float p,
float r) {
58 q.set_hpr(LVector3f(h, p, r));
59 q.extract_to_matrix(rot);
67 void PhysxForceFieldDesc::
68 set_kernel_constant(
const LVector3f &constant) {
76 void PhysxForceFieldDesc::
77 set_kernel_position_target(
const LPoint3f &target) {
85 void PhysxForceFieldDesc::
86 set_kernel_velocity_target(
const LVector3f &target) {
94 void PhysxForceFieldDesc::
95 set_kernel_torus_radius(
float radius) {
97 _kernel.torusRadius = radius;
103 void PhysxForceFieldDesc::
104 set_kernel_falloff_linear(
const LVector3f &falloff) {
112 void PhysxForceFieldDesc::
113 set_kernel_falloff_quadratic(
const LVector3f &falloff) {
121 void PhysxForceFieldDesc::
122 set_kernel_noise(
const LVector3f &noise) {
130 void PhysxForceFieldDesc::
131 set_kernel_position_multiplier(
const LMatrix3f &multiplier) {
139 void PhysxForceFieldDesc::
140 set_kernel_velocity_multiplier(
const LMatrix3f &multiplier) {
148 void PhysxForceFieldDesc::
149 create_kernel(NxScene *scenePtr) {
151 _desc.kernel = scenePtr->createForceFieldLinearKernel(_kernel);
157 void PhysxForceFieldDesc::
158 set_coordinates(PhysxForceFieldCoordinates coordinates) {
160 _desc.coordinates = (NxForceFieldCoordinates) coordinates;
166 void PhysxForceFieldDesc::
169 _desc.includeGroupShapes.push_back(desc.ptr());
175 void PhysxForceFieldDesc::
178 _desc.shapeGroups.push_back(group->ptr());
184 void 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.