vrsode/src/Shape.cpp

Go to the documentation of this file.
00001 
00002 #include "Shape.h"
00003 
00004 namespace vrsode
00005 {
00006 
00007 Shape::Shape()
00008 {
00009     m_geomId = 0;
00010     m_debugNode = new VRS::SceneThing();
00011     m_debugNodeActive = false;
00012     m_offsetRotation = new VRS::Rotation();
00013     setCollisionShape(CS_None);
00014 }
00015 
00016 Shape::~Shape()
00017 {
00018 }
00019 
00020 VRS::SO<VRS::SceneThing>
00021 Shape::debugNode()
00022 {
00023     return m_debugNode;
00024 }
00025 
00026 void
00027 Shape::setDebugNode(VRS::SO<VRS::SceneThing> p_sceneThing)
00028 {
00029     m_debugNode = p_sceneThing;
00030 }
00031 
00032 VRS::Vector
00033 Shape::offsetCenter()
00034 {
00035     return m_offsetCenter;
00036 }
00037 
00038 void
00039 Shape::setOffsetCenter(VRS::Vector p_offset)
00040 {
00041     m_offsetCenter = p_offset;
00042 }
00043 
00044 VRS::SO<VRS::Rotation>
00045 Shape::offsetRotation()
00046 {
00047     return m_offsetRotation;
00048 }
00049 
00050 void
00051 Shape::setOffsetRotation(VRS::SO<VRS::Rotation> p_rotation)
00052 {
00053     m_offsetRotation = p_rotation;
00054 }
00055 
00056 void
00057 Shape::setCollisionShape(CollisionShape p_shape)
00058 {
00059     m_collisionShape = p_shape;
00060 }
00061 
00062 CollisionShape
00063 Shape::collisionShape()
00064 {
00065     return m_collisionShape;
00066 }
00067 
00068 void
00069 Shape::setGeomId(dGeomID p_geomId)
00070 {
00071     m_geomId = p_geomId;
00072 }
00073 
00074 dGeomID
00075 Shape::geomId()
00076 {
00077     return m_geomId;
00078 }
00079 
00080 void
00081 Shape::activateDebugNode(bool p_enable)
00082 {
00083     m_debugNodeActive = p_enable;
00084     
00085     if(m_debugNodeActive)
00086         createDebugNode();
00087 }
00088 
00089 bool
00090 Shape::debugNodeActive()
00091 {
00092     return m_debugNodeActive;
00093 }
00094 
00095 }

Generated on Fri May 11 21:01:58 2007 for Random Racer by  doxygen 1.5.1