Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions

ForceNode Class Reference

A force that lives in the scene graph and is therefore subject to local coordinate systems. More...

#include "forceNode.h"

Inheritance diagram for ForceNode:
PandaNode TypedWritable Namable LinkedListNode ReferenceCount TypedObject MemoryBase MemoryBase MemoryBase

List of all members.

Public Member Functions

 ForceNode (const string &name)
 default constructor
virtual ~ForceNode ()
 destructor
void add_force (BaseForce *force)
void add_forces_from (const ForceNode &other)
 append operation
void clear ()
virtual TypeHandle force_init_type ()
BaseForceget_force (int index) const
int get_num_forces () const
virtual TypeHandle get_type () const
virtual PandaNodemake_copy () const
 dynamic child copy
 MAKE_SEQ (get_forces, get_num_forces, get_force)
virtual void output (ostream &out) const
 Write a string representation of this instance to <out>.
void remove_force (BaseForce *f)
 remove operation
void remove_force (int index)
 remove operation
virtual bool safe_to_flatten () const
 Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating instances (by calling dupe_for_flatten()), false otherwise (for instance, a Camera cannot be safely flattened, because the Camera pointer itself is meaningful).
virtual void write (ostream &out, unsigned int indent=0) const
 Write a string representation of this instance to <out>.
virtual void write_forces (ostream &out, unsigned int indent=0) const
 Write a string representation of this instance to <out>.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()

Protected Member Functions

 ForceNode (const ForceNode &copy)
 copy constructor

Detailed Description

A force that lives in the scene graph and is therefore subject to local coordinate systems.

An example of this would be simulating gravity in a rotating space station. or something.

Definition at line 30 of file forceNode.h.


Constructor & Destructor Documentation

ForceNode::ForceNode ( const string &  name)

default constructor

Definition at line 26 of file forceNode.cxx.

Referenced by make_copy().

ForceNode::~ForceNode ( ) [virtual]

destructor

Definition at line 46 of file forceNode.cxx.

ForceNode::ForceNode ( const ForceNode copy) [protected]

copy constructor

Definition at line 36 of file forceNode.cxx.


Member Function Documentation

void ForceNode::add_forces_from ( const ForceNode other)

append operation

Definition at line 65 of file forceNode.cxx.

PandaNode * ForceNode::make_copy ( ) const [virtual]

dynamic child copy

Reimplemented from PandaNode.

Definition at line 55 of file forceNode.cxx.

References ForceNode().

void ForceNode::output ( ostream &  out) const [virtual]

Write a string representation of this instance to <out>.

Reimplemented from PandaNode.

Definition at line 117 of file forceNode.cxx.

void ForceNode::remove_force ( int  index)

remove operation

Definition at line 99 of file forceNode.cxx.

void ForceNode::remove_force ( BaseForce f)

remove operation

Definition at line 84 of file forceNode.cxx.

virtual bool ForceNode::safe_to_flatten ( ) const [inline, virtual]

Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating instances (by calling dupe_for_flatten()), false otherwise (for instance, a Camera cannot be safely flattened, because the Camera pointer itself is meaningful).

Reimplemented from PandaNode.

Definition at line 49 of file forceNode.h.

void ForceNode::write ( ostream &  out,
unsigned int  indent = 0 
) const [virtual]

Write a string representation of this instance to <out>.

Definition at line 148 of file forceNode.cxx.

void ForceNode::write_forces ( ostream &  out,
unsigned int  indent = 0 
) const [virtual]

Write a string representation of this instance to <out>.

Definition at line 129 of file forceNode.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations