Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/collide/collisionEntry.cxx

Go to the documentation of this file.
00001 // Filename: collisionEntry.cxx
00002 // Created by:  drose (16Mar02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #include "collisionEntry.h"
00020 
00021 TypeHandle CollisionEntry::_type_handle;
00022 
00023 ////////////////////////////////////////////////////////////////////
00024 //     Function: CollisionEntry::Copy Constructor
00025 //       Access: Public
00026 //  Description:
00027 ////////////////////////////////////////////////////////////////////
00028 CollisionEntry::
00029 CollisionEntry(const CollisionEntry &copy) :
00030   _from(copy._from),
00031   _into(copy._into),
00032   _from_node(copy._from_node),
00033   _into_node(copy._into_node),
00034   _into_node_path(copy._into_node_path),
00035   _from_space(copy._from_space),
00036   _into_space(copy._into_space),
00037   _wrt_space(copy._wrt_space),
00038   _inv_wrt_space(copy._inv_wrt_space),
00039   _flags(copy._flags),
00040   _into_intersection_point(copy._into_intersection_point),
00041   _into_surface_normal(copy._into_surface_normal),
00042   _into_depth(copy._into_depth)
00043 {
00044 }
00045 
00046 ////////////////////////////////////////////////////////////////////
00047 //     Function: CollisionEntry::Copy Assignment Operator
00048 //       Access: Public
00049 //  Description:
00050 ////////////////////////////////////////////////////////////////////
00051 void CollisionEntry::
00052 operator = (const CollisionEntry &copy) {
00053   _from = copy._from;
00054   _into = copy._into;
00055   _from_node = copy._from_node;
00056   _into_node = copy._into_node;
00057   _into_node_path = copy._into_node_path;
00058   _from_space = copy._from_space;
00059   _into_space = copy._into_space;
00060   _wrt_space = copy._wrt_space;
00061   _inv_wrt_space = copy._inv_wrt_space;
00062   _flags = copy._flags;
00063   _into_intersection_point = copy._into_intersection_point;
00064   _into_surface_normal = copy._into_surface_normal;
00065   _into_depth = copy._into_depth;
00066 }
00067 
00068 ////////////////////////////////////////////////////////////////////
00069 //     Function: CollisionEntry::compute_from_surface_normal
00070 //       Access: Private
00071 //  Description: Computes the "from" surface normal by converting the
00072 //               "into" surface normal into the colliding object's
00073 //               space.
00074 ////////////////////////////////////////////////////////////////////
00075 void CollisionEntry::
00076 compute_from_surface_normal() {
00077   _from_surface_normal = get_into_surface_normal() * get_inv_wrt_space();
00078   _flags |= F_has_from_surface_normal;
00079 }

Generated on Fri May 2 00:35:27 2003 for Panda by doxygen1.3