14#ifndef LINEARNOISEFORCE_H
15#define LINEARNOISEFORCE_H
30 virtual void output(std::ostream &out)
const;
31 virtual void write(std::ostream &out,
int indent=0)
const;
38 static unsigned char _prn_table[256];
39 static LVector3 _gradient_table[256];
40 static bool _initialized;
42 INLINE PN_stdfloat cubic_step(
const PN_stdfloat x)
const;
43 INLINE LVector3 vlerp(
const PN_stdfloat t,
const LVector3& v0,
const LVector3& v1)
const;
45 INLINE
unsigned char get_prn_entry(
const LPoint3& point)
const;
46 INLINE
unsigned char get_prn_entry(
const PN_stdfloat x,
const PN_stdfloat y,
const PN_stdfloat z)
const;
48 INLINE LVector3& get_lattice_entry(
const LPoint3& point);
49 INLINE LVector3& get_lattice_entry(
const PN_stdfloat x,
const PN_stdfloat y,
const PN_stdfloat z);
51 INLINE
unsigned char prn_lookup(
int index)
const;
54 virtual LinearForce *make_copy();
60 static void init_type() {
61 LinearRandomForce::init_type();
63 LinearRandomForce::get_class_type());
66 return get_class_type();
68 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
This is a convenience class to specialize ConfigVariable as an integer type.
static void init_noise_tables()
One-time config function, sets up the PRN lattice.
LinearNoiseForce(PN_stdfloat a=1.0f, bool m=false)
constructor
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
A body on which physics will be applied.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...