~saiarcot895/ubuntu/trusty/openscenegraph/armhf-support

« back to all changes in this revision

Viewing changes to OpenSceneGraph/src/osgPlugins/mdl/Mesh.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Loic Dachary (OuoU)
  • Date: 2009-03-23 14:08:20 UTC
  • mfrom: (1.1.7 upstream) (2.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090323140820-i4j3jozdlhyn4lre
rules prevent lib64 with -D LIB_POSTFIX="" (Closes: #517671)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#include "Mesh.h"
 
3
 
 
4
 
 
5
using namespace mdl;
 
6
 
 
7
 
 
8
Mesh::Mesh(MDLMesh * myMesh)
 
9
{
 
10
    // Save the mesh information
 
11
    my_mesh = myMesh;
 
12
 
 
13
    // Initialize the state set to NULL
 
14
    state_set = NULL;
 
15
}
 
16
 
 
17
 
 
18
Mesh::~Mesh()
 
19
{
 
20
    // Clean up the associated data
 
21
    delete my_mesh;
 
22
}
 
23
 
 
24
 
 
25
void Mesh::setStateSet(osg::StateSet * stateSet)
 
26
{
 
27
    state_set = stateSet;
 
28
}
 
29
 
 
30
 
 
31
osg::StateSet * Mesh::getStateSet()
 
32
{
 
33
    return state_set.get();
 
34
}
 
35
 
 
36
 
 
37
MDLMesh * Mesh::getMesh()
 
38
{
 
39
    return my_mesh;
 
40
}
 
41
 
 
42
 
 
43
int Mesh::getNumLODVertices(int lodNum)
 
44
{
 
45
    return my_mesh->vertex_data.num_lod_vertices[lodNum];
 
46
}