Update of /cvsroot/playerstage/code/gazebo/server/models/GroundPlane
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13268/GroundPlane
Added Files:
Tag: ogre
GroundPlane.cc GroundPlane.hh SConscript
Log Message:
updates
--- NEW FILE: GroundPlane.cc ---
#include <stdio.h>
#include "Body.hh"
#include "PlaneGeom.hh"
#include "ModelFactory.hh"
#include "XMLConfig.hh"
#include "GroundPlane.hh"
GZ_REGISTER_STATIC("GroundPlane", GroundPlane);
GroundPlane::GroundPlane()
{
}
GroundPlane::~GroundPlane()
{
}
// Load the child model
int GroundPlane::LoadChild(XMLConfigNode *node)
{
this->body = this->CreateBody();
Vector3 normal = node->GetVector3("normal",Vector3(0,1,0));
double altitude = node->GetDouble("altitude",0,0);
this->geom = new PlaneGeom(this->body,altitude,normal);
Pose3d pose(node->GetVector3("xyz",Vector3(0,0,0)),
node->GetRotation("rpt",Quatern(1,0,0,0)));
this->body->SetPose(pose);
this->body->SetEnabled(false);
this->geom->SetMeshMaterial(node->GetString("material","Gazebo/GrassFloor",0));
return 0;
}
// Initialize the child model
int GroundPlane::InitChild()
{
return 0;
}
// Update the child model
int GroundPlane::UpdateChild()
{
return 0;
}
// Finilaize thie child model
int GroundPlane::FiniChild()
{
return 0;
}
--- NEW FILE: SConscript ---
#Import variable
Import('env staticObjs sharedObjs')
sources = Split('GroundPlane.cc')
staticObjs.append(env.StaticObject(sources))
sharedObjs.append(env.SharedObject(sources))
--- NEW FILE: GroundPlane.hh ---
#ifndef GROUNDPLANE_HH
#define GROUNDPLANE_HH
#include "Model.hh"
class Body;
class Geom;
class XMLConfigNode;
class GroundPlane : public Model
{
public: GroundPlane();
public: virtual ~GroundPlane();
// Load the child model
protected: virtual int LoadChild(XMLConfigNode *node);
// Initialize the child model
protected: virtual int InitChild();
// Update the child model
protected: virtual int UpdateChild();
// Finilaize thie child model
protected: virtual int FiniChild();
private: Body *body;
private: Geom *geom;
};
#endif
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit