Panda3D
physxSoftBodyNode.I
1 // Filename: physxSoftBodyNode.I
2 // Created by: enn0x (13Sep10)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 
17 ////////////////////////////////////////////////////////////////////
18 // Function: PhysxSoftBodyNode::Constructor
19 // Access: Published
20 // Description:
21 ////////////////////////////////////////////////////////////////////
22 INLINE PhysxSoftBodyNode::
23 PhysxSoftBodyNode(const char *name) : GeomNode(name) {
24 
25  _vdata = new GeomVertexData("", GeomVertexFormat::get_v3n3t2(), Geom::UH_stream);
26 
27  _prim = new GeomTriangles(Geom::UH_stream);
28  _prim->set_shade_model(Geom::SM_uniform);
29 
30  _geom = new Geom(_vdata);
31  _geom->add_primitive(_prim);
32 
33  this->add_geom(_geom);
34 }
35 
36 ////////////////////////////////////////////////////////////////////
37 // Function: PhysxSoftBodyNode::Destructor
38 // Access: Published
39 // Description:
40 ////////////////////////////////////////////////////////////////////
41 INLINE PhysxSoftBodyNode::
42 ~PhysxSoftBodyNode() {
43 
44 }
45 
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
A container for geometry primitives.
Definition: geom.h:58
Defines a series of disconnected triangles.
Definition: geomTriangles.h:25
A node that holds Geom objects, renderable pieces of geometry.
Definition: geomNode.h:37
void add_geom(Geom *geom, const RenderState *state=RenderState::make_empty())
Adds a new Geom to the node.
Definition: geomNode.cxx:642