Mercurial > hg > Members > e075743
view src/CollisionNode.h @ 10:5727d511a13a
add src in Martial Project Xcode.
author | tokumoritaichirou@nw0743.st.ie.u-ryukyu.ac.jp |
---|---|
date | Wed, 03 Feb 2010 03:39:04 +0900 |
parents | |
children |
line wrap: on
line source
/* * CollisionNode.h * Martial * * Created by ryoma on 10/01/26. * Copyright 2010 琉球大学. All rights reserved. * */ #ifndef _COLLISION_NODE_H_ #define _COLLISION_NODE_H_ #include <osg/Group> #include <osg/Node> #include <osg/Drawable> #include <osg/Geode> #include <osg/Material> #include <osg/Shape> #include <osg/ShapeDrawable> #include <osg/StateSet> class CollisionNode { protected: osg::Group* collisionGroup; osg::Geode* collisionNode; osg::Shape* shape; float radius; osg::ShapeDrawable* drawable; bool collision; bool attack; bool guard; char* name; public: CollisionNode(char* name = "CollisionNode", osg::Sphere* _shape = new osg::Sphere(osg::Vec3(0, 0, 0), 0)); CollisionNode(char* name = "CollisionNode", osg::Cylinder* _shape = new osg::Cylinder(osg::Vec3(0, 0, 0),0, 0)); CollisionNode(char* name = "CollisionNode", osg::Geode* geode = NULL, osg::Shape* shape = new osg::Sphere(osg::Vec3(0,0,0),0)); osg::Geode* getGeode(); osg::BoundingSphere getBound(osg::Matrix localToWorldMatrix); osg::NodePath getNodePath(); //void drawable(); //void unDrawable(); void setCollision(bool collision); char* getName(); }; #endif