Panda3D
|
00001 // Filename: physxClothNode.I 00002 // Created by: enn0x (05Apr10) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 00017 //////////////////////////////////////////////////////////////////// 00018 // Function: PhysxClothNode::Constructor 00019 // Access: Published 00020 // Description: 00021 //////////////////////////////////////////////////////////////////// 00022 INLINE PhysxClothNode:: 00023 PhysxClothNode(const char *name) : GeomNode(name) { 00024 00025 _numVertices = 0; 00026 00027 _vdata = new GeomVertexData("", GeomVertexFormat::get_v3n3t2(), Geom::UH_stream); 00028 00029 _prim = new GeomTriangles(Geom::UH_stream); 00030 _prim->set_shade_model(Geom::SM_uniform); 00031 00032 _geom = new Geom(_vdata); 00033 _geom->add_primitive(_prim); 00034 00035 this->add_geom(_geom); 00036 00037 _numTexcoords = 0; 00038 _texcoords = NULL; 00039 } 00040 00041 //////////////////////////////////////////////////////////////////// 00042 // Function: PhysxClothNode::Destructor 00043 // Access: Published 00044 // Description: 00045 //////////////////////////////////////////////////////////////////// 00046 INLINE PhysxClothNode:: 00047 ~PhysxClothNode() { 00048 00049 if (_texcoords) { 00050 delete [] _texcoords; 00051 } 00052 } 00053