Panda3D
colladaPrimitive.I
1 // Filename: colladaPrimitive.I
2 // Created by: rdb (23May11)
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 // Function: ColladaPrimitive::add_input
18 // Description: Adds a new ColladaInput to this primitive.
19 ////////////////////////////////////////////////////////////////////
20 INLINE void ColladaPrimitive::
21 add_input(ColladaInput *input) {
22  if (input->get_offset() >= _stride) {
23  _stride = input->get_offset() + 1;
24  }
25  _inputs.push_back(input);
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: ColladaPrimitive::get_geom
30 // Description: Returns the Geom associated with this primitive.
31 ////////////////////////////////////////////////////////////////////
32 INLINE PT(Geom) ColladaPrimitive::
33 get_geom() const {
34  return _geom;
35 }
36 
37 ////////////////////////////////////////////////////////////////////
38 // Function: ColladaPrimitive::get_material
39 // Description: Returns the name of this primitive's material, or
40 // the empty string if none was assigned.
41 ////////////////////////////////////////////////////////////////////
42 INLINE const string &ColladaPrimitive::
43 get_material() const {
44  return _material;
45 }
Class that deals with COLLADA data sources.
Definition: colladaInput.h:45
A container for geometry primitives.
Definition: geom.h:58
unsigned int get_offset() const
Returns the offset associated with this input.
Definition: colladaInput.I:31